[Fuego] [PATCH 15/16] fail_check_cases should not abort the job

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Thu Mar 30 01:04:43 UTC 2017


failure is something normal and should be kept in a variable
to return it at the end to jenkins. If we just abort then
post_test will not have a chance to return $FUEGO_RESULT

TODO: probably we should change $FUEGO_RESULT though

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/scripts/functions.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
index 2483f61..4379271 100755
--- a/engine/scripts/functions.sh
+++ b/engine/scripts/functions.sh
@@ -331,7 +331,6 @@ function bench_processing {
 }
 
 # search in test log for {!JOB_NAME}_FAIL_PATTERN_n fail cases and abort with message {!JOB_NAME}_FAIL_MESSAGE_n if found
-# args: $1 - path to test log
 function fail_check_cases () {
     testlog="${LOGDIR}/testlog.txt"
     slog_prefix="${LOGDIR}/syslog"
@@ -364,8 +363,7 @@ function fail_check_cases () {
 
             if diff -ua ${slog_prefix}.before ${slog_prefix}.after | grep -vEf "$FUEGO_CORE/engine/scripts/syslog.ignore" | grep -E -e $fptemplate;
             then
-                echo "Located failing message in syslog diff"
-                abort_job "Detected fail message in syslog diff: $fpmessage"
+                echo "Detected fail message in syslog diff: $fpmessage"
             else
                 continue
             fi
@@ -373,8 +371,7 @@ function fail_check_cases () {
 
         if grep -e "$fptemplate" $testlog ;
         then
-            echo "Located failing message in $1"
-            abort_job "Detected fail message: $fpmessage"
+            echo "Detected fail message in $testlog: $fpmessage"
         fi
     done
 }
@@ -444,8 +441,10 @@ function post_test {
   ov_logger "Test $1 is finished"
 
 # Syslog comparison
+  # TODO: should affect FUEGO_RESULT
   syslog_cmp
 
+  # TODO: should affect FUEGO_RESULT
   fail_check_cases  || true
 
 # create functional result file
-- 
2.7.4




More information about the Fuego mailing list