tox: use ostestr
make tox use ostesr and teach tox OS_TEST_PATH. This is a preparation for functional test. Change-Id: Ia443b349178b15bf2789ca2a3a20d7dac8778d09
This commit is contained in:
@@ -3,6 +3,6 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
|||||||
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
||||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
||||||
OS_LOG_CAPTURE=1 \
|
OS_LOG_CAPTURE=1 \
|
||||||
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
|
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_odl/tests/unit} $LISTOPT $IDOPTION
|
||||||
test_id_option=--load-list $IDFILE
|
test_id_option=--load-list $IDFILE
|
||||||
test_list_option=--list
|
test_list_option=--list
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
|
|||||||
sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
|
sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
|
||||||
oslosphinx>=4.7.0 # Apache-2.0
|
oslosphinx>=4.7.0 # Apache-2.0
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
|
os-testr>=0.8.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||||
testresources>=0.2.4 # Apache-2.0/BSD
|
testresources>=0.2.4 # Apache-2.0/BSD
|
||||||
testscenarios>=0.4 # Apache-2.0/BSD
|
testscenarios>=0.4 # Apache-2.0/BSD
|
||||||
|
|||||||
8
tools/ostestr_compat_shim.sh
Executable file
8
tools/ostestr_compat_shim.sh
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# preserve old behavior of using an arg as a regex when '--' is not present
|
||||||
|
case $@ in
|
||||||
|
(*--*) ostestr $@;;
|
||||||
|
('') ostestr;;
|
||||||
|
(*) ostestr --regex "$@"
|
||||||
|
esac
|
||||||
4
tox.ini
4
tox.ini
@@ -12,7 +12,9 @@ install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:h
|
|||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
commands = bash tools/pretty_tox.sh '{posargs}'
|
commands = {toxinidir}/tools/ostestr_compat_shim.sh {posargs}
|
||||||
|
# there is also secret magic in ostestr which lets you run in a fail only
|
||||||
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
|
|||||||
Reference in New Issue
Block a user