summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-01-29 13:50:10 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-01-29 15:19:02 -0500
commit997855db3b95d1e8e057502d42597ecdd44027b5 (patch)
treecd82b58ffa9d26a76860d0a210379e327dacea70
parent75034abe515a49e0efafb91519cfdf448ba02c73 (diff)
downloadsqlalchemy-migrate-997855db3b95d1e8e057502d42597ecdd44027b5.tar.gz
Add pretty_tox setup
This changeset adds the pretty_tox script runner to SQLAlchemy-migrate, so that current test runs can be viewed clearly. Change-Id: I3884703e24cb636983a0202c46899c772419d401
-rw-r--r--test-requirements.txt1
-rwxr-xr-xtools/pretty_tox.sh16
-rw-r--r--tox.ini4
3 files changed, 19 insertions, 2 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index 3a10a63..573ce34 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -16,6 +16,7 @@ sphinx>=1.1.2,<1.2
sphinxcontrib_issuetracker
testrepository>=0.0.17
testtools>=0.9.34,<0.9.36
+tempest-lib>=0.1.0
scripttest
# NOTE(rpodolyaka): This version identifier is currently necessary as
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
new file mode 100755
index 0000000..794ff12
--- /dev/null
+++ b/tools/pretty_tox.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# return nonzero exit status of rightmost command, so that we
+# get nonzero exit on test failure without halting subunit-trace
+set -o pipefail
+
+
+TESTRARGS=$1
+
+python setup.py testr --testr-args="--subunit $TESTRARGS --concurrency=1" | subunit-trace -f
+retval=$?
+# NOTE(mtreinish) The pipe above would eat the slowest display from pbr's testr
+# wrapper so just manually print the slowest tests
+echo -e "\nSlowest Tests:\n"
+testr slowest
+exit $retval
diff --git a/tox.ini b/tox.ini
index f272695..57dedd3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,12 +5,12 @@ envlist = py26,py27,py26sa07,py27sa07,py26sa08,py27sa08,py26sa09,py27sa09,py33,p
[testenv]
usedevelop = True
+whitelist_externals = bash
install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-commands =
- python setup.py testr --slowest --testr-args='{posargs} --concurrency=1'
+commands = bash tools/pretty_tox.sh '{posargs}'
[testenv:py26]
deps = sqlalchemy>=0.9