diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-10-11 13:05:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-10-11 13:07:14 -0400 |
commit | 187398318ef9b8b66e0f19ef031a847e8824e1d1 (patch) | |
tree | 305cbca569bc9825240cd92e7f023315daa9db95 | |
parent | 0546edde66b3ca3dfbbd51f95b906d9e8f4f1459 (diff) | |
download | tor-187398318ef9b8b66e0f19ef031a847e8824e1d1.tar.gz tor-187398318ef9b8b66e0f19ef031a847e8824e1d1.zip |
When python is available, run the commandline unit tests from "make check"
-rw-r--r-- | changes/python-tests | 4 | ||||
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | src/test/include.am | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/changes/python-tests b/changes/python-tests new file mode 100644 index 0000000000..4373e31e6a --- /dev/null +++ b/changes/python-tests @@ -0,0 +1,4 @@ + o Minor features: + - "make check" now runs extra tests beyond the unit test scripts if + Python is installed. + diff --git a/configure.ac b/configure.ac index 926b53d492..77767c52a6 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ], [ diff --git a/src/test/include.am b/src/test/include.am index 54adc40a8b..ed0ef04247 100644 --- a/src/test/include.am +++ b/src/test/include.am @@ -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 + |