]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
When python is available, run the commandline unit tests from "make check"
authorNick Mathewson <nickm@torproject.org>
Fri, 11 Oct 2013 17:05:58 +0000 (13:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 11 Oct 2013 17:07:14 +0000 (13:07 -0400)
changes/python-tests [new file with mode: 0644]
configure.ac
src/test/include.am

diff --git a/changes/python-tests b/changes/python-tests
new file mode 100644 (file)
index 0000000..4373e31
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor features:
+    - "make check" now runs extra tests beyond the unit test scripts if
+      Python is installed.
+
index 926b53d492d3f95a5e8766b89a5707afa0ce269a..77767c52a68ffaeac8029f6b6f2c461e45788139 100644 (file)
@@ -183,6 +183,13 @@ AM_CONDITIONAL(NAT_PMP, test x$natpmp = xtrue)
 AM_CONDITIONAL(MINIUPNPC, test x$upnp = xtrue)
 AM_PROG_CC_C_O
 
+AC_ARG_VAR(PYTHON)
+AC_CHECK_PROGS(PYTHON, [python python2 python3])
+if test "x$PYTHON" = "x"; then
+  AC_MSG_WARN([Python unavailable; some tests will not be run.])
+fi
+AM_CONDITIONAL(USEPYTHON, [test "x$PYTHON" != "x"])
+
 ifdef([AC_C_FLEXIBLE_ARRAY_MEMBER], [
 AC_C_FLEXIBLE_ARRAY_MEMBER
 ], [
index 54adc40a8bc90ad88027119f26c7237c9ae1c69f..ed0ef042473dcbf21c80ef6b4d692eb9ddb411ac 100644 (file)
@@ -1,4 +1,4 @@
-TESTS+= src/test/test
+TESTS += src/test/test
 
 noinst_PROGRAMS+= src/test/bench
 if UNITTESTS_ENABLED
@@ -77,3 +77,8 @@ src_test_test_ntor_cl_AM_CPPFLAGS =          \
 
 endif
 
+check-local:
+if USEPYTHON
+       $(PYTHON) src/test/test_cmdline_args.py
+endif
+