[Fuego] [PATCH 16/19] LTP: fix the buildonly and runonly cases

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Fri May 12 08:19:57 UTC 2017


Previous changes had broken the buildonly/runonly support
so fix it.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/tests/Functional.LTP/fuego_test.sh | 14 +++++++-------
 engine/tests/Functional.LTP/parser.py     |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/engine/tests/Functional.LTP/fuego_test.sh b/engine/tests/Functional.LTP/fuego_test.sh
index 3d3d360..8ea78c7 100755
--- a/engine/tests/Functional.LTP/fuego_test.sh
+++ b/engine/tests/Functional.LTP/fuego_test.sh
@@ -161,10 +161,13 @@ function test_run {
 }
 
 function test_fetch_results {
-    echo "Fetching LTP results"
-    echo "PWD: $PWD"
-    echo "Triplet: $WORKSPACE/$TRIPLET"
-    get $FUNCTIONAL_LTP_RUNFOLDER/result .
+    if [ "$FUNCTIONAL_LTP_BUILDONLY" = "false" ]; then
+        echo "Fetching LTP results"
+        rm -rf result/
+        get $FUNCTIONAL_LTP_RUNFOLDER/result .
+    else
+        echo "Skip fetching LTP results"
+    fi
 }
 
 function test_processing {
@@ -178,11 +181,8 @@ function test_processing {
         [ -e results.xlsx ] && cp results.xlsx ${LOGDIR}/results.xlsx
         [ -e rt.log ] && cp rt.log $FUEGO_RW/logs/$JOB_NAME/
         cd ..
-        rm -rf result/
     else
         echo "Processing LTP build log"
         log_compare "$TESTDIR" "1836" "compile PASSED$" "p"
     fi
 }
-
-
diff --git a/engine/tests/Functional.LTP/parser.py b/engine/tests/Functional.LTP/parser.py
index 6f0638c..feab36a 100755
--- a/engine/tests/Functional.LTP/parser.py
+++ b/engine/tests/Functional.LTP/parser.py
@@ -77,8 +77,8 @@ def read_output (test_category, test_case):
 try:
     os.chdir('./result')
 except:
-    print "ERROR: no result directory"
-    sys.exit(1)
+    print "WARNING: no result directory (probably a build only test)."
+    sys.exit(3)
 
 tests = os.listdir('.')
 tests.sort()
-- 
2.7.4




More information about the Fuego mailing list