summaryrefslogtreecommitdiffstats
path: root/run_tests.sh
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2012-10-22 11:33:29 -0700
committerDan Smith <danms@us.ibm.com>2012-10-22 15:52:22 -0700
commit51cc2eb3a7a8116e727bcc907a726e5af0a18b0c (patch)
treee0fcbe59689a9f7e2b527e32262581b0d92acf02 /run_tests.sh
parent4011a767c0ba45b244e004fb9a15ad921985ead9 (diff)
downloadnova-51cc2eb3a7a8116e727bcc907a726e5af0a18b0c.tar.gz
nova-51cc2eb3a7a8116e727bcc907a726e5af0a18b0c.tar.xz
nova-51cc2eb3a7a8116e727bcc907a726e5af0a18b0c.zip
Fix the fail-on-zero-tests case so that it is tolerant of no output
Some ways of running run_tests.sh will not output a line for us to parse the count from. Treat no "Ran X tests" as "Ran 0 tests". Change-Id: I96ba13e797ceaf9b9fa2b60ccb558510b5e32a88
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 87a5e3b05..5e31f906a 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -100,7 +100,7 @@ function run_tests {
fi
else
tests_run=$(awk '/^Ran/ {print $2}' nosetests.log)
- if [ "$tests_run" -eq 0 ];
+ if [ -z "$tests_run" ] || [ "$tests_run" -eq 0 ];
then
echo "ERROR: Zero tests ran, something is wrong!"
echo "This is usually caused by a parse error in some python"