[tor-commits] [tor/master] Integrate ntor test into the automake test suite.

nickm at torproject.org nickm at torproject.org
Thu Apr 23 14:26:07 UTC 2015


commit c535494238cee580acaa6debe2eb942bb90ea59d
Author: cypherpunks <cypherpunks at torproject.org>
Date:   Thu Mar 5 10:43:12 2015 +0100

    Integrate ntor test into the automake test suite.
---
 .gitignore               |    1 +
 configure.ac             |    1 +
 src/test/include.am      |    6 ++++--
 src/test/test_ntor.sh.in |    9 +++++++++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 5fc000f..da5fc47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -175,6 +175,7 @@ cscope.*
 /src/test/test-ntor-cl.exe
 /src/test/test_workqueue.exe
 /src/test/test_zero_length_keys.sh
+/src/test/test_ntor.sh
 
 # /src/tools/
 /src/tools/tor-checkkey
diff --git a/configure.ac b/configure.ac
index 32afc1b..184211b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1663,6 +1663,7 @@ AC_CONFIG_FILES([
         scripts/maint/checkOptionDocs.pl
         scripts/maint/updateVersions.pl
         src/test/test_zero_length_keys.sh
+        src/test/test_ntor.sh
 ])
 
 if test x$asciidoc = xtrue && test "$ASCIIDOC" = "none" ; then
diff --git a/src/test/include.am b/src/test/include.am
index eba13ab..0ed3cb3 100644
--- a/src/test/include.am
+++ b/src/test/include.am
@@ -1,6 +1,10 @@
 TESTS += src/test/test src/test/test-slow src/test/test-memwipe \
 	src/test/test_zero_length_keys.sh
 
+if USEPYTHON
+TESTS += src/test/test_ntor.sh
+endif
+
 TEST_EXTENSIONS = .sh
 SH_LOG_COMPILER = $(SHELL)
 
@@ -169,8 +173,6 @@ src_test_test_bt_cl_CPPFLAGS= $(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
 
 check-local: $(NTOR_TEST_DEPS) $(CMDLINE_TEST_TOR)
 if USEPYTHON
-	$(PYTHON) $(top_srcdir)/src/test/ntor_ref.py test-tor
-	$(PYTHON) $(top_srcdir)/src/test/ntor_ref.py self-test
 	$(top_builddir)/src/test/test-bt-cl assert | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
 	$(top_builddir)/src/test/test-bt-cl crash | $(PYTHON) $(top_srcdir)/src/test/bt_test.py
 endif
diff --git a/src/test/test_ntor.sh.in b/src/test/test_ntor.sh.in
new file mode 100644
index 0000000..5fea8ce
--- /dev/null
+++ b/src/test/test_ntor.sh.in
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Validate Tor's ntor implementation.
+
+exitcode=0
+
+ at PYTHON@ @abs_top_srcdir@/src/test/ntor_ref.py test-tor || exitcode=1
+ at PYTHON@ @abs_top_srcdir@/src/test/ntor_ref.py self-test || exitcode=1
+
+exit ${exitcode}





More information about the tor-commits mailing list