[test-suite] r263776 - [LNTBased/SPEC] Only populate <test>.exec.status upon failure

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 21:45:48 PDT 2016


Author: anemet
Date: Thu Mar 17 23:45:47 2016
New Revision: 263776

URL: http://llvm.org/viewvc/llvm-project?rev=263776&view=rev
Log:
[LNTBased/SPEC] Only populate <test>.exec.status upon failure

This is what the rest of the testsuite does which makes it more
convenient to grep for errors directly in report.json.  I.e. if
<test>.exec.status is present, it's guaranteed to hold the value of
FAIL.

Modified:
    test-suite/trunk/LNTBased/lib/spec.py

Modified: test-suite/trunk/LNTBased/lib/spec.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LNTBased/lib/spec.py?rev=263776&r1=263775&r2=263776&view=diff
==============================================================================
--- test-suite/trunk/LNTBased/lib/spec.py (original)
+++ test-suite/trunk/LNTBased/lib/spec.py Thu Mar 17 23:45:47 2016
@@ -252,7 +252,10 @@ class TestModule(nt.TestModule):
             if self.call(cmd, cwd=self.OBJROOT, shell=True, env=os.environ) != 0:
                 status = FAIL
 
-        return [
+        result =  [
             TestSamples(self.testname + '.compile', [compile_time]),
-            TestSamples(self.testname + '.exec', [exec_time]),
-            TestSamples(self.testname + '.exec.status', [status])]
+            TestSamples(self.testname + '.exec', [exec_time])]
+        if status == FAIL:
+            result.append(TestSamples(self.testname + '.exec.status', [status]))
+
+        return result




More information about the llvm-commits mailing list