bug(tox): Support regular expressions via tox -e py35
This PS simply allows tox -e py35 to take in regular expressions for better testing experience. For example: tox -e py35 # runs all unit tests tox -e py35 -- test_armada_controller # only run unit tests that match Change-Id: Iab5a70fa0d51e1572a31943d8f38bc9b0d6a7c18
This commit is contained in:
parent
15957e5bd3
commit
23433b0808
15
tools/run-unit-tests.sh
Executable file
15
tools/run-unit-tests.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script for passing regex filtering of unit tests to py.test conditionally.
|
||||
# Needed because tox currently doesn't support conditional logic like this.
|
||||
|
||||
posargs=$@
|
||||
if [ ${#posargs} -ge 1 ]; then
|
||||
py.test -vvv -s --ignore=hapi -k $1
|
||||
else
|
||||
py.test -vvv -s --ignore=hapi
|
||||
fi
|
||||
TEST_STATUS=$?
|
||||
set -e
|
||||
|
||||
exit $TEST_STATUS
|
Loading…
Reference in New Issue
Block a user