fix run_tests exit status 21/621/1
authorHans Feldt <hans.feldt@ericsson.com>
Thu, 21 May 2015 09:27:57 +0000 (11:27 +0200)
committerHans Feldt <hans.feldt@ericsson.com>
Thu, 21 May 2015 09:27:57 +0000 (11:27 +0200)
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 <hans.feldt@ericsson.com>
run_tests.sh

index e7040e7..6770e64 100755 (executable)
@@ -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