All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
To: fuego@lists.linuxfoundation.org
Subject: [Fuego] [PATCH 14/19] parser: allow parser.py to skip processing
Date: Fri, 12 May 2017 17:19:55 +0900	[thread overview]
Message-ID: <1494577200-11597-15-git-send-email-daniel.sangorrin@toshiba.co.jp> (raw)
In-Reply-To: <1494577200-11597-1-git-send-email-daniel.sangorrin@toshiba.co.jp>

For some specs the parser.py may want to just skip. Returning
a 0 would cause an error on the execution of dataload.py. For
that reason I added another return value (3) to specify that
the parser.py didn't need to run.

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

diff --git a/engine/scripts/functions.sh b/engine/scripts/functions.sh
index 188408d..1d7bce9 100755
--- a/engine/scripts/functions.sh
+++ b/engine/scripts/functions.sh
@@ -359,13 +359,12 @@ function processing {
 
     PYTHON_ARGS="-W ignore::DeprecationWarning -W ignore::UserWarning"
     if [ -e "$TEST_HOME/parser.py" ] ; then
-        # FIXTHIS: make sure that json is generated even on failures
         run_python $PYTHON_ARGS $FUEGO_CORE/engine/tests/${TESTDIR}/parser.py && rc=0 || rc=$?
     else
         run_python $PYTHON_ARGS $FUEGO_CORE/engine/scripts/generic_parser.py $RETURN_VALUE && rc=0 || rc=$?
     fi
 
-    # return codes: 0 (everything ok), 1 (problem while parsing, see log), 2 (the results didn't satisfy the threshold)
+    # return codes: 0 (everything ok), 1 (problem while parsing, see log), 2 (the results didn't satisfy the threshold), 3 (parser does not need to run)
     if [ $rc -eq 0 ] || [ $rc -eq 2 ]; then
         # store results as a json file fro the flot plugin
         run_python $PYTHON_ARGS $FUEGO_CORE/engine/scripts/parser/dataload.py && rc=0 || echo "dataload.py didn't work properly"
@@ -377,8 +376,11 @@ function processing {
             RETURN_VALUE=1
         fi
     else
-        echo "ERROR: problem while running the parser"
-        RETURN_VALUE=1
+        if [ $rc -eq 3 ]; then
+            echo "parser.py does not need to run"
+        else
+            abort_job "ERROR: problem while running the parser"
+        fi
     fi
 
     # make a convenience link to the Jenkins console log, if the log doesn't exist
-- 
2.7.4



  parent reply	other threads:[~2017-05-12  8:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12  8:19 [Fuego] New batch of patches Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 01/19] fail_regexp: rename FAIL_PATTERN to FAIL_REGEXP for coherency Daniel Sangorrin
2017-05-12 22:56   ` Bird, Timothy
2017-05-12  8:19 ` [Fuego] [PATCH 02/19] functions:fail_check_cases: add message when no fail cases available Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 03/19] ft2demos: fix test and add to docker Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 04/19] unpack: remove nostrip option Daniel Sangorrin
2017-05-12 22:57   ` Bird, Timothy
2017-05-12  8:19 ` [Fuego] [PATCH 05/19] unpack: move code related to spec-defined tarballs to unpack Daniel Sangorrin
2017-05-12 23:05   ` Bird, Timothy
2017-05-12  8:19 ` [Fuego] [PATCH 06/19] bc: test that specs can override the tarball variable Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 07/19] unpack: handle possible errors Daniel Sangorrin
2017-05-12 23:09   ` Bird, Timothy
2017-05-12  8:19 ` [Fuego] [PATCH 08/19] main: remove ReBuild check Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 09/19] rebuild: make it simpler for test developers Daniel Sangorrin
2017-05-12 23:02   ` Bird, Timothy
2017-05-16  2:35     ` Daniel Sangorrin
2017-05-16  4:35       ` Daniel Sangorrin
2017-05-16  4:52         ` Bird, Timothy
2017-05-16  5:14           ` Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 10/19] call_if_present: tests do not need to implement dummy functions Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 11/19] expat: remove unneeded semicolons Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 12/19] tarball: remove unneeded tarball definitions Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 13/19] style: fix trailing spaces and indentation Daniel Sangorrin
2017-05-12  8:19 ` Daniel Sangorrin [this message]
2017-05-12  8:19 ` [Fuego] [PATCH 15/19] LTP: copy target_bin before modifying it Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 16/19] LTP: fix the buildonly and runonly cases Daniel Sangorrin
2017-05-12  8:19 ` [Fuego] [PATCH 17/19] LTP: add support for skipping certain test cases Daniel Sangorrin
2017-05-12 22:57   ` Bird, Timothy
2017-05-12  8:19 ` [Fuego] [PATCH 18/19] LTP: add a spec for docker Daniel Sangorrin
2017-05-12  8:20 ` [Fuego] [PATCH 19/19] LTP: add a fixthis for the -t flag Daniel Sangorrin
2017-05-12 22:52 ` [Fuego] New batch of patches Bird, Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494577200-11597-15-git-send-email-daniel.sangorrin@toshiba.co.jp \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=fuego@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.