aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2015-03-05 10:43:12 +0100
committerNick Mathewson <nickm@torproject.org>2015-04-23 09:56:16 -0400
commitc535494238cee580acaa6debe2eb942bb90ea59d (patch)
treeb8e320689f551a63a99fd0fa48ccc5a3fc73b5e6
parent21e242530783f9f71bad3e94f6482ac100c710e8 (diff)
downloadtor-c535494238cee580acaa6debe2eb942bb90ea59d.tar.gz
tor-c535494238cee580acaa6debe2eb942bb90ea59d.zip
Integrate ntor test into the automake test suite.
-rw-r--r--.gitignore1
-rw-r--r--configure.ac1
-rw-r--r--src/test/include.am6
-rw-r--r--src/test/test_ntor.sh.in9
4 files changed, 15 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 5fc000f1ab..da5fc478b0 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 32afc1b6b5..184211b558 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 eba13abd24..0ed3cb336f 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 0000000000..5fea8ce31a
--- /dev/null
+++ b/src/test/test_ntor.sh.in
@@ -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}