Add context to unit tests

When running the unit tests we will now see which tests is being
run and the status of the test in question. This will help debugging,
triaging and cleaning things up.

Change-Id: I6d1458654d2fb6a8e814b17c4673bb9337fac4ec
This commit is contained in:
Gary Kotton 2017-01-01 01:50:56 -08:00
parent 56bdf7ae0e
commit 4edcf3a8df
2 changed files with 9 additions and 2 deletions

8
tools/ostestr_compat_shim.sh Executable file
View 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

View File

@ -14,8 +14,7 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --slowest --testr-args='{posargs}'
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
[testenv:cover]
whitelist_externals = sh