[llvm-commits] [llvm] r110638 - /llvm/trunk/utils/lit/lit/TestRunner.py
Dan Gohman
gohman at apple.com
Mon Aug 9 18:03:35 PDT 2010
Author: djg
Date: Mon Aug 9 20:03:34 2010
New Revision: 110638
URL: http://llvm.org/viewvc/llvm-project?rev=110638&view=rev
Log:
Expand uses of python 2.6's "A if B else C" syntax into regular
if-else statements, to hopefully support older pythons (PR7850).
Modified:
llvm/trunk/utils/lit/lit/TestRunner.py
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=110638&r1=110637&r2=110638&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Mon Aug 9 20:03:34 2010
@@ -520,10 +520,16 @@
out,err,exitCode = res
if isXFail:
ok = exitCode != 0 or err
- status = Test.XFAIL if ok else Test.XPASS
+ if ok:
+ status = Test.XFAIL
+ else:
+ status = Test.XPASS
else:
ok = exitCode == 0 and not err
- status = Test.PASS if ok else Test.FAIL
+ if ok:
+ status = Test.PASS
+ else:
+ status = Test.FAIL
if ok:
return (status,'')
@@ -560,10 +566,16 @@
out,err,exitCode = res
if isXFail:
ok = exitCode != 0
- status = Test.XFAIL if ok else Test.XPASS
+ if ok:
+ status = Test.XFAIL
+ else:
+ status = Test.XPASS
else:
ok = exitCode == 0
- status = Test.PASS if ok else Test.FAIL
+ if ok:
+ status = Test.PASS
+ else:
+ status = Test.FAIL
if ok:
return (status,'')
More information about the llvm-commits
mailing list