]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove pretty_tox and use ostestr
authorJohn Griffith <john.griffith8@gmail.com>
Fri, 29 May 2015 19:02:13 +0000 (13:02 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Fri, 29 May 2015 19:42:48 +0000 (19:42 +0000)
This patch dumps pretty_tox.sh and gets Cinder on board
with using ostestr.  We're setting a concurrency value
of 6 (instances in the gate are 6 VCPU's), and things
seem to be stable at this value.

For folks running on 'smaller' system, it's still possible
to run in parallell; > ncpu's but if there are problems you
can still specify concurrency in your tox argument.  Tox will
take the last occurence of the conncurrency argument; so for
example if you specify "tox -epy27 -- --concurrency=4" the
interpretted value for concurrency in the run will be 4.

Closes-Bug: #1459852

Change-Id: Iae12b42e915da22c863781015512df4f30aa95ca

test-requirements.txt
tools/pretty_tox.sh [deleted file]
tox.ini

index 35a420e7654606b5723b0105624dbb3e670f094e..37f120da35b31fbc31e3aa963d51dcb2640edd63 100644 (file)
@@ -18,4 +18,5 @@ python-subunit>=0.0.18
 testtools>=0.9.36,!=1.2.0
 testrepository>=0.0.18
 oslosphinx>=2.5.0  # Apache-2.0
+os-testr>=0.1.0
 tempest-lib>=0.5.0
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
deleted file mode 100755 (executable)
index c6ed23b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/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 test --no-parallel --slowest --testr-args="$TESTRARGS"
-else
-    python setup.py test --no-parallel --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
-fi
diff --git a/tox.ini b/tox.ini
index 3060c8ad87a734191370a61e2cb2e4cbe12a5009..bcb1a9e6b4a989a92f7a8b72f0844926db176855 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -13,8 +13,14 @@ install_command = pip install {opts} {packages}
 
 deps = -r{toxinidir}/requirements.txt
        -r{toxinidir}/test-requirements.txt
-commands =
-  bash tools/pretty_tox.sh '{posargs}'
+
+# Note, we set concurrency to 6 here as a default
+# ostestr will take the last entry for occurence
+# so if you want to increase/decrease this you
+# can simply add concurrency arg to your tox
+# call ie: 'tox -epy27 -- --concurrency=4'
+commands = ostestr --concurrency=6 {posargs}
+
 whitelist_externals = bash
 
 [tox:jenkins]