aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-03-26 12:37:49 -0400
committerteor <teor@torproject.org>2020-04-07 17:35:51 +1000
commit9b434b79ce74dab0498fc0ee1df5df3b2441cfad (patch)
tree33e94aa660c3a7b164c475ff38df0b195b74fa7a
parent978b7ef45c21169a01a81cd1b206530cbcd47fe2 (diff)
downloadtor-9b434b79ce74dab0498fc0ee1df5df3b2441cfad.tar.gz
tor-9b434b79ce74dab0498fc0ee1df5df3b2441cfad.zip
Add a test script to check subsystem order as part of make check.
-rwxr-xr-xscripts/maint/run_check_subsystem_order.sh17
-rw-r--r--src/test/include.am4
2 files changed, 20 insertions, 1 deletions
diff --git a/scripts/maint/run_check_subsystem_order.sh b/scripts/maint/run_check_subsystem_order.sh
new file mode 100755
index 0000000000..1e68b9d008
--- /dev/null
+++ b/scripts/maint/run_check_subsystem_order.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -e
+
+TOR="${abs_top_builddir:-.}/src/app/tor"
+
+INCLUDES_PY="${abs_top_srcdir:-.}/scripts/maint/practracker/includes.py"
+
+if ! test -x "${INCLUDES_PY}" ; then
+ echo "skip"
+ exit 77
+fi
+
+"${TOR}" --dbg-dump-subsystem-list | \
+ "${INCLUDES_PY}" --check-subsystem-order -
+
+echo ok
diff --git a/src/test/include.am b/src/test/include.am
index de927836d6..e7647260c5 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -37,7 +37,8 @@ TESTSCRIPTS += \
src/test/test_ntor.sh \
src/test/test_hs_ntor.sh \
src/test/test_bt.sh \
- scripts/maint/practracker/test_practracker.sh
+ scripts/maint/practracker/test_practracker.sh \
+ scripts/maint/run_check_subsystem_order.sh
if COVERAGE_ENABLED
# ...
@@ -430,6 +431,7 @@ EXTRA_DIST += \
src/test/test_rebind.sh \
src/test/test_rebind.py \
src/test/zero_length_keys.sh \
+ scripts/maint/run_check_subsystem_order.sh \
src/test/rust_supp.txt \
src/test/test_keygen.sh \
src/test/test_key_expiration.sh \