diff options
author | Ilya Tyaptin <ityaptin@mirantis.com> | 2015-05-15 16:43:36 +0300 |
---|---|---|
committer | Ilya Tyaptin <ityaptin@mirantis.com> | 2015-06-04 16:29:02 +0300 |
commit | 57a9fc5bce838497846bd97b25a7517f7943da96 (patch) | |
tree | 8b7ae71efc993315b5a81e0dcf0bcb93331518f0 /tools | |
parent | 960af604ad8f373df7d114dd25c398c92108cdb1 (diff) | |
download | ceilometer-57a9fc5bce838497846bd97b25a7517f7943da96.tar.gz |
Add running functional scripts for defined backend
This CR allows running "functional" tox job for different backends.
Short description about expected workflow:
1. Gate job run ceilometer/ceilometer/tests/functional/hooks/post_test_hook.py
with <backend> parameter.
2. This script run "tox -efunctional" command with defined variable
CEILOMETER_TEST_BACKEND
3. After in "run-functional-tests.sh" setup script for the backend
and testr are runned.
In this CR running testr with pretty_tox.sh script added because
it allows to use subunit-trace output which developed in tempest-lib
and improve useful of testr output.
Partially implements: blueprint ceilometer-functional-tests
Change-Id: Idb66aca0b46779516db2baec856df8223dbe5c13
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/pretty_tox.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh new file mode 100755 index 00000000..799ac184 --- /dev/null +++ b/tools/pretty_tox.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -o pipefail + +TESTRARGS=$1 + +# --until-failure is not compatible with --subunit see: +# +# https://bugs.launchpad.net/testrepository/+bug/1411804 +# +# this work around exists until that is addressed +if [[ "$TESTARGS" =~ "until-failure" ]]; then + python setup.py testr --slowest --testr-args="$TESTRARGS" +else + python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f +fi |