aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-01-13 09:00:50 +0000
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-01-13 09:00:50 +0000
commit9059d8d7170a834e5048ac08a375bfceca52ed71 (patch)
treebb0016a4264d28dbc6e0cd0f02c95affb067e312 /tools
parentd579e62b431a31856a03098dc5323948ccfa4fdb (diff)
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 <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_tests.sh7
1 files changed, 7 insertions, 0 deletions
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