aboutsummaryrefslogtreecommitdiffstats
path: root/utils/lit
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-04 00:00:13 +0000
committerDan Gohman <gohman@apple.com>2010-08-04 00:00:13 +0000
commite1390c40a6135b5caa4b0f6db1c3375dcffd4d05 (patch)
treef1f31d699a5dec04c0d9f1ee28d68533effe9db6 /utils/lit
parenta41af344c2964573318a77e2b43eafd4d3804003 (diff)
downloadexternal_llvm-e1390c40a6135b5caa4b0f6db1c3375dcffd4d05.zip
external_llvm-e1390c40a6135b5caa4b0f6db1c3375dcffd4d05.tar.gz
external_llvm-e1390c40a6135b5caa4b0f6db1c3375dcffd4d05.tar.bz2
Use the regular conditional operator syntax instead of a clever hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r--utils/lit/lit/TestRunner.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index 3c2fe38..f653245 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/utils/lit/lit/TestRunner.py
@@ -522,10 +522,10 @@ def executeTclTest(test, litConfig):
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 @@ def executeShTest(test, litConfig, useExternalSh):
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,'')