[llvm-commits] [llvm] r110168 - /llvm/trunk/utils/lit/lit/TestRunner.py
Dan Gohman
gohman at apple.com
Tue Aug 3 17:00:13 PDT 2010
Author: djg
Date: Tue Aug 3 19:00:13 2010
New Revision: 110168
URL: http://llvm.org/viewvc/llvm-project?rev=110168&view=rev
Log:
Use the regular conditional operator syntax instead of a clever hack.
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=110168&r1=110167&r2=110168&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Aug 3 19:00:13 2010
@@ -522,10 +522,10 @@
out,err,exitCode = res
if isXFail:
ok = exitCode != 0
- status = (Test.XPASS, Test.XFAIL)[ok]
+ status = Test.XFAIL if ok else Test.XPASS
else:
ok = exitCode == 0
- status = (Test.FAIL, Test.PASS)[ok]
+ status = Test.PASS if ok else Test.FAIL
if ok:
return (status,'')
@@ -558,10 +558,10 @@
out,err,exitCode = res
if isXFail:
ok = exitCode != 0
- status = (Test.XPASS, Test.XFAIL)[ok]
+ status = Test.XFAIL if ok else Test.XPASS
else:
ok = exitCode == 0
- status = (Test.FAIL, Test.PASS)[ok]
+ status = Test.PASS if ok else Test.FAIL
if ok:
return (status,'')
More information about the llvm-commits
mailing list