From 9059d8d7170a834e5048ac08a375bfceca52ed71 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Sat, 13 Jan 2018 09:00:50 +0000 Subject: Do not hide unit tests execution fail While moving tests from ./tests/ to ./yardstick/tests, both unit tests directories are executed. If the first test run fails, do not hide the error and exit immediately. Change-Id: Ib6c64ccf2f4b19722722eb43b3d45d5ad5f0169d Signed-off-by: Rodolfo Alonso Hernandez --- tools/run_tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/run_tests.sh b/tools/run_tests.sh index 633c93859..32c4f19e4 100755 --- a/tools/run_tests.sh +++ b/tools/run_tests.sh @@ -29,9 +29,16 @@ run_tests() { echo "Running unittest ... " if [ $FILE_OPTION == "f" ]; then python -m unittest discover -v -s tests/unit > $logfile 2>&1 + if [ $? -ne 0 ]; then + echo "FAILED, results in $logfile" + exit 1 + fi python -m unittest discover -v -s yardstick/tests/unit >> $logfile 2>&1 else python -m unittest discover -v -s tests/unit + if [ $? -ne 0 ]; then + exit 1 + fi python -m unittest discover -v -s yardstick/tests/unit fi -- cgit 1.2.3-korg