diff options
author | Clark Boylan <clark.boylan@gmail.com> | 2013-04-22 19:53:25 -0700 |
---|---|---|
committer | Clark Boylan <clark.boylan@gmail.com> | 2013-05-13 10:54:54 -0700 |
commit | 7f262c5ae2b4d18f0198807bfdcbde207e5a4b87 (patch) | |
tree | b33764cfbf133e47cfd271cbf97b09593b05388e | |
parent | bfc3a3ccb2811cc8a96a15987528e6639ec029bf (diff) | |
download | nova-7f262c5ae2b4d18f0198807bfdcbde207e5a4b87.tar.gz nova-7f262c5ae2b4d18f0198807bfdcbde207e5a4b87.tar.xz nova-7f262c5ae2b4d18f0198807bfdcbde207e5a4b87.zip |
Fix run_tests.sh usage of tools/colorizer.py.
* run_tests.sh: tools/colorizer.py expects subunit v1 and not v2.
Convert the subunit stream to v1 if subunit-2to1 is present (this
indicates v2 of subunit is being used) before passing the output on to
tools/colorizer.py.
Fixes bug #1168516
Change-Id: I6be917181fa8d18764db89e741190964546d0632
-rwxr-xr-x | run_tests.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/run_tests.sh b/run_tests.sh index 4d02fe570..fc754bbb0 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -137,7 +137,14 @@ function run_tests { testrargs=`echo "$testrargs" | sed -e's/^\s*\(.*\)\s*$/\1/'` TESTRTESTS="$TESTRTESTS --testr-args='--subunit $testropts $testrargs'" echo "Running \`${wrapper} $TESTRTESTS\`" - bash -c "${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py" + if ${wrapper} which subunit-2to1 2>&1 > /dev/null + then + # subunit-2to1 is present, testr subunit stream should be in version 2 + # format. Convert to version one before colorizing. + bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py" + else + bash -c "${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py" + fi RESULT=$? set -e |