diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-10 01:03:34 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-10 01:03:34 +0000 |
commit | ac6a3c4c66e5d4562ada6f78e7027639d3d16a7d (patch) | |
tree | 60b046d4ddcbd9e1525d8817b29f3401bc402ead /llvm/utils/lit | |
parent | 3ebcf7f09bd70a41af22b627e8302cccb001053f (diff) | |
download | bcm5719-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.py | 20 |
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,'') |