[test-suite] r269912 - [LNT] Update timeit.sh to have the same return code as timeit when --append-exitstatus is used

Silviu Baranga via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 05:31:46 PDT 2016


Author: sbaranga
Date: Wed May 18 07:31:45 2016
New Revision: 269912

URL: http://llvm.org/viewvc/llvm-project?rev=269912&view=rev
Log:
[LNT] Update timeit.sh to have the same return code as timeit when --append-exitstatus is used

Summary:
When passing --append-exitstatus, timeit will write the exit status
to the output and return 0 (with some exceptions in some edge cases).
The exit status will then be checked as part of the output with fpcmp.

We need timeit.sh to do the same (otherwise we will wrongly record a
failure for some tests).

Reviewers: jmolloy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D20361

Modified:
    test-suite/trunk/tools/timeit.sh

Modified: test-suite/trunk/tools/timeit.sh
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/timeit.sh?rev=269912&r1=269911&r2=269912&view=diff
==============================================================================
--- test-suite/trunk/tools/timeit.sh (original)
+++ test-suite/trunk/tools/timeit.sh Wed May 18 07:31:45 2016
@@ -39,6 +39,10 @@ fi
 EXITCODE=$?
 if [ "$APPEND_STATUS" = "1" ]; then
   echo "exit $EXITCODE" >> $OUTPUT
+  # When --append-exitstatus is used, timeit will append the
+  # exit status to the output file and return 0. Model this
+  # behaviour here.
+  EXITCODE=0
 fi
 
 echo exit $EXITCODE > $REPORT




More information about the llvm-commits mailing list