vici: Run Python tests via tox if available
Since we use the serial test harness we can't use AM_TESTS_ENVIRONMENT. The script is necessary for out-of-tree builds.
This commit is contained in:
parent
574621d80a
commit
b723431540
|
@ -1345,6 +1345,7 @@ if test x$python_eggs = xtrue; then
|
|||
else
|
||||
AC_SUBST(PYTHONEGGINSTALLDIR, "--install-dir $pythoneggdir")
|
||||
fi
|
||||
AC_PATH_PROG([TOX], [tox], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
|
||||
AC_PATH_PROG([PY_TEST], [py.test], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
|
||||
fi
|
||||
AM_CONDITIONAL(PYTHON_EGGS_INSTALL, [test "x$python_eggs_install" = xtrue])
|
||||
|
@ -1764,7 +1765,8 @@ AM_CONDITIONAL(USE_LEGACY_SYSTEMD, test -n "$systemdsystemunitdir" -a "x$systemd
|
|||
AM_CONDITIONAL(USE_RUBY_GEMS, test x$ruby_gems = xtrue)
|
||||
AM_CONDITIONAL(USE_PYTHON_EGGS, test x$python_eggs = xtrue)
|
||||
AM_CONDITIONAL(USE_PERL_CPAN, test x$perl_cpan = xtrue)
|
||||
AM_CONDITIONAL(USE_PY_TEST, test "x$PY_TEST" != x)
|
||||
AM_CONDITIONAL(USE_TOX, test "x$TOX" != x)
|
||||
AM_CONDITIONAL(USE_PY_TEST, test "x$PY_TEST" != x -a "x$TOX" = x)
|
||||
|
||||
# ========================
|
||||
# set global definitions
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
EXTRA_DIST = LICENSE README.rst MANIFEST.in \
|
||||
setup.py.in \
|
||||
tox.ini \
|
||||
tox.sh \
|
||||
vici/test/__init__.py \
|
||||
vici/test/test_protocol.py \
|
||||
vici/__init__.py \
|
||||
|
@ -38,6 +39,12 @@ install-exec-local: dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
|
|||
dist/vici-$(PYTHON_PACKAGE_VERSION)-py$(PYTHON_VERSION).egg
|
||||
endif
|
||||
|
||||
if USE_TOX
|
||||
TESTS_ENVIRONMENT = export TOX=$(TOX);
|
||||
AM_TESTS_FD_REDIRECT = 1>&2
|
||||
TESTS = tox.sh
|
||||
endif
|
||||
|
||||
if USE_PY_TEST
|
||||
TESTS = $(PY_TEST)
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
${TOX} -c ${srcdir} --skip-missing-interpreters
|
Loading…
Reference in New Issue