[LNT] r311614 - CI logging compatibles error messages

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 15:27:05 PDT 2017


Author: cmatthews
Date: Wed Aug 23 15:27:05 2017
New Revision: 311614

URL: http://llvm.org/viewvc/llvm-project?rev=311614&view=rev
Log:
CI logging compatibles error messages

We have CI log scanning in Jenkins that looks for error:, so it is nice
when the error messages look like that.

Modified:
    lnt/trunk/lnt/util/ServerUtil.py
    lnt/trunk/tests/lnttool/submit.shtest

Modified: lnt/trunk/lnt/util/ServerUtil.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/util/ServerUtil.py?rev=311614&r1=311613&r2=311614&view=diff
==============================================================================
--- lnt/trunk/lnt/util/ServerUtil.py (original)
+++ lnt/trunk/lnt/util/ServerUtil.py Wed Aug 23 15:27:05 2017
@@ -23,7 +23,7 @@ def _show_json_error(reply):
     except ValueError:
         print "error: {}".format(reply)
         return
-    sys.stderr.write("lnt server error: {}\n".format(error.get('error')))
+    sys.stderr.write("error: lnt server: {}\n".format(error.get('error')))
     message = error.get('message', '')
     if message:
         sys.stderr.write(message + '\n')

Modified: lnt/trunk/tests/lnttool/submit.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/submit.shtest?rev=311614&r1=311613&r2=311614&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/submit.shtest (original)
+++ lnt/trunk/tests/lnttool/submit.shtest Wed Aug 23 15:27:05 2017
@@ -93,19 +93,19 @@ lnt submit "http://localhost:9091/db_def
 rm -f "${OUTPUT_DIR}/submit_errors.txt"
 lnt submit "http://localhost:9091/db_default/v4/badsuite/submitRun" --commit "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
 # RUN: FileCheck %s --check-prefix=CHECK-ERRORS < %t.tmp/submit_errors.txt
-# CHECK-ERRORS: lnt server error: Unknown test suite 'badsuite'!
+# CHECK-ERRORS: error: lnt server: Unknown test suite 'badsuite'!
 lnt submit "http://localhost:9091/db_baddb/v4/compile/submitRun" --commit "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
-# CHECK-ERRORS: lnt server error: The page you are looking for does not exist.
+# CHECK-ERRORS: error: lnt server: The page you are looking for does not exist.
 lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/invalid_submission0.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
-# CHECK-ERRORS: lnt server error: could not parse input format
+# CHECK-ERRORS: error: lnt server: could not parse input format
 # ...
 # CHECK-ERRORS: SystemExit: unable to guess input format for
 lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/invalid_submission1.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
-# CHECK-ERRORS: lnt server error: import failure: machine
+# CHECK-ERRORS: error: lnt server: import failure: machine
 # ...
 # CHECK-ERRORS: KeyError: 'machine'
 lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/compile_submission_machine_diff_reject.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
-# CHECK-ERRORS: lnt server error: import failure: 'hw.activecpu' on machine 'some-compile-suite-machine' changed.
+# CHECK-ERRORS: error: lnt server: import failure: 'hw.activecpu' on machine 'some-compile-suite-machine' changed.
 # ...
 # CHECK-ERRORS: MachineInfoChanged: 'hw.activecpu' on machine 'some-compile-suite-machine' changed.
 # CHECK-ERRORS: Note: Use --update-machine to update the existing machine information.




More information about the llvm-commits mailing list