summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-27 17:28:46 +0000
committerGerrit Code Review <review@openstack.org>2013-03-27 17:28:46 +0000
commit8de417fbb2c5414dc0d762d43171d7e311ccb8f0 (patch)
tree80cf4c4c69952ac552360803ff26859be720bd5d
parentea663f3627ff11eea90e457c3b53432d640c63b2 (diff)
parent89c501ec139b8c3e5daccb4e52dc9fec4161dea0 (diff)
downloadnova-8de417fbb2c5414dc0d762d43171d7e311ccb8f0.tar.gz
nova-8de417fbb2c5414dc0d762d43171d7e311ccb8f0.tar.xz
nova-8de417fbb2c5414dc0d762d43171d7e311ccb8f0.zip
Merge "Bring back colorizer again with error results."
-rwxr-xr-xrun_tests.sh4
-rwxr-xr-xtools/colorizer.py16
2 files changed, 18 insertions, 2 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 29e723c7f..4d02fe570 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -129,7 +129,7 @@ function run_tests {
if [ $coverage -eq 1 ]; then
TESTRTESTS="$TESTRTESTS --coverage"
else
- TESTRTESTS="$TESTRTESTS --slowest"
+ TESTRTESTS="$TESTRTESTS"
fi
# Just run the test suites in current environment
@@ -137,7 +137,7 @@ 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} subunit2pyunit"
+ bash -c "${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py"
RESULT=$?
set -e
diff --git a/tools/colorizer.py b/tools/colorizer.py
index 2df3c2bf8..1dfe04cd0 100755
--- a/tools/colorizer.py
+++ b/tools/colorizer.py
@@ -302,6 +302,22 @@ class NovaTestResult(testtools.TestResult):
self._writeElapsedTime(elapsed)
self.stream.writeln()
+ def printErrors(self):
+ if self.showAll:
+ self.stream.writeln()
+ self.printErrorList('ERROR', self.errors)
+ self.printErrorList('FAIL', self.failures)
+
+ def printErrorList(self, flavor, errors):
+ for test, err in errors:
+ self.colorizer.write("=" * 70, 'red')
+ self.stream.writeln()
+ self.colorizer.write(flavor, 'red')
+ self.stream.writeln(": %s" % test.id())
+ self.colorizer.write("-" * 70, 'red')
+ self.stream.writeln()
+ self.stream.writeln("%s" % err)
+
test = subunit.ProtocolTestCase(sys.stdin, passthrough=None)