From: Hans Feldt Date: Thu, 21 May 2015 09:27:57 +0000 (+0200) Subject: fix run_tests exit status X-Git-Tag: brahmaputra.1.0~247 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F621%2F1;p=yardstick.git fix run_tests exit status previously run_tests always returned 0 no matter the result. It can now be hooked up to a gerrit gate job. Change-Id: I2c4bccec71c179fd2b1b965613c34179da830ac5 JIRA: - Signed-off-by: Hans Feldt --- diff --git a/run_tests.sh b/run_tests.sh index e7040e77f..6770e64cb 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -17,6 +17,7 @@ run_flake8() { flake8 yardstick > $logfile if [ $? -ne 0 ]; then echo "FAILED, result in $logfile" + exit 1 else echo "OK, result in $logfile" fi @@ -28,6 +29,7 @@ run_tests() { python -m unittest discover -s yardstick/tests &> $logfile if [ $? -ne 0 ]; then echo "FAILED, result in $logfile" + exit 1 else echo "OK, result in $logfile" fi