]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Integrate ntor test into the automake test suite.
authorcypherpunks <cypherpunks@torproject.org>
Thu, 5 Mar 2015 09:43:12 +0000 (10:43 +0100)
committerNick Mathewson <nickm@torproject.org>
Thu, 23 Apr 2015 13:56:16 +0000 (09:56 -0400)
.gitignore
configure.ac
src/test/include.am
src/test/test_ntor.sh.in [new file with mode: 0644]

index 5fc000f1ab9554be89fea4f36bfb88734175d428..da5fc478b0b4c416abcfad19d4fb75bae63a962e 100644 (file)
@@ -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
index 32afc1b6b58db4d8bbd1d66a84c72714adb75e2d..184211b5588e18796207ce169c0a07c2051a1a44 100644 (file)
@@ -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
index eba13abd24d0e26a447b0d3dc8f021a4016bf777..0ed3cb336f8a7a8dabd50a3f965b83f68b4c222b 100644 (file)
@@ -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 (file)
index 0000000..5fea8ce
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Validate Tor's ntor implementation.
+
+exitcode=0
+
+@PYTHON@ @abs_top_srcdir@/src/test/ntor_ref.py test-tor || exitcode=1
+@PYTHON@ @abs_top_srcdir@/src/test/ntor_ref.py self-test || exitcode=1
+
+exit ${exitcode}