summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-10 01:03:34 +0000
committerDan Gohman <gohman@apple.com>2010-08-10 01:03:34 +0000
commitbd2499a0b128ca15e97d8d67e72f8c9024d3310b (patch)
treef251ecbaca0af46cc562c7ad66b01d1e225da607 /utils
parent60e72d9ebc2b718929159d8860af2ded21ed8f23 (diff)
downloadllvm-bd2499a0b128ca15e97d8d67e72f8c9024d3310b.tar.gz
llvm-bd2499a0b128ca15e97d8d67e72f8c9024d3310b.tar.bz2
llvm-bd2499a0b128ca15e97d8d67e72f8c9024d3310b.tar.xz
Expand uses of python 2.6's "A if B else C" syntax into regular
if-else statements, to hopefully support older pythons (PR7850). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/lit/lit/TestRunner.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index 9776784a16..0eb51a8294 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/utils/lit/lit/TestRunner.py
@@ -520,10 +520,16 @@ def executeTclTest(test, litConfig):
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 @@ def executeShTest(test, litConfig, useExternalSh):
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,'')