mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-20 18:48:13 +00:00
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
This commit is contained in:
parent
838e42928b
commit
c5bc7b091e
@ -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,'')
|
||||
|
Loading…
Reference in New Issue
Block a user