Fix yardstick.out overwritten bug
[yardstick.git] / run_tests.sh
index e7040e7..b2bf807 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
@@ -24,15 +25,15 @@ run_flake8() {
 
 run_tests() {
     echo -n "Running unittest ... "
-    logfile=test.log
-    python -m unittest discover -s yardstick/tests &> $logfile
+    python -m unittest discover -s tests/unit
     if [ $? -ne 0 ]; then
         echo "FAILED, result in $logfile"
+        exit 1
     else
         echo "OK, result in $logfile"
     fi
 }
 
 run_flake8
-run_tests
+#run_tests