summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit
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
commitac6a3c4c66e5d4562ada6f78e7027639d3d16a7d (patch)
tree60b046d4ddcbd9e1525d8817b29f3401bc402ead /llvm/utils/lit
parent3ebcf7f09bd70a41af22b627e8302cccb001053f (diff)
downloadbcm5719-llvm-ac6a3c4c66e5d4562ada6f78e7027639d3d16a7d.tar.gz
bcm5719-llvm-ac6a3c4c66e5d4562ada6f78e7027639d3d16a7d.zip
Expand uses of python 2.6's "A if B else C" syntax into regular
if-else statements, to hopefully support older pythons (PR7850). llvm-svn: 110638
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r--llvm/utils/lit/lit/TestRunner.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index 9776784a163..0eb51a82940 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/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,'')
OpenPOWER on IntegriCloud