[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] practracker: Add unit tests to test script, and test script to makefile



commit fa60fee8d56af01f6fefca17f945bdd00d195571
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Aug 1 14:01:43 2019 -0400

    practracker: Add unit tests to test script, and test script to makefile
    
    This makes all of the practracker tests get run by make check, and
    hence by our CI.
    
    Closes ticket 31304.
---
 changes/ticket31304                           | 3 +++
 scripts/maint/practracker/test_practracker.sh | 4 ++++
 src/test/include.am                           | 6 +++++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/changes/ticket31304 b/changes/ticket31304
new file mode 100644
index 000000000..ca60148b0
--- /dev/null
+++ b/changes/ticket31304
@@ -0,0 +1,3 @@
+  o Minor features (tests):
+    - The practracker tests are now run as part of the Tor test suite.
+      Closes ticket 31304.
diff --git a/scripts/maint/practracker/test_practracker.sh b/scripts/maint/practracker/test_practracker.sh
index 590525660..c7be22770 100755
--- a/scripts/maint/practracker/test_practracker.sh
+++ b/scripts/maint/practracker/test_practracker.sh
@@ -29,6 +29,10 @@ run_practracker() {
         "${DATA}/" "$@";
 }
 
+echo "unit tests:"
+
+"${PYTHON:-python}" "${PRACTRACKER_DIR}/practracker_tests.py" || exit 1
+
 echo "ex0:"
 
 run_practracker --exceptions "${DATA}/ex0.txt" > "${TMPDIR}/ex0-received.txt"
diff --git a/src/test/include.am b/src/test/include.am
index 0ec4d96ad..7cd1ecae3 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -31,7 +31,11 @@ TESTSCRIPTS += \
 endif
 
 if USEPYTHON
-TESTSCRIPTS += src/test/test_ntor.sh src/test/test_hs_ntor.sh src/test/test_bt.sh
+TESTSCRIPTS += \
+	src/test/test_ntor.sh \
+	src/test/test_hs_ntor.sh \
+	src/test/test_bt.sh \
+	scripts/maint/practracker/test_practracker.sh
 
 if COVERAGE_ENABLED
 # ...



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits