mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
PR10867. lit would interpret
RUN: a RUN: b || true as "a && (b || true)" in Tcl mode, and as "(a && b) || true" in sh mode. Everyone seems to (quite reasonably) write tests assuming the Tcl behavior, so use that in sh mode too. llvm-svn: 169441
This commit is contained in:
parent
92dcde6e6d
commit
27aef165bb
9
test/tools/llvm-lit/chain.c
Normal file
9
test/tools/llvm-lit/chain.c
Normal file
@ -0,0 +1,9 @@
|
||||
// This test should fail. lit used to interpret this as:
|
||||
// (false && false) || true
|
||||
// instead of the intended
|
||||
// false && (false || true
|
||||
//
|
||||
// RUN: false
|
||||
// RUN: false || true
|
||||
//
|
||||
// XFAIL: *
|
@ -241,11 +241,16 @@ def executeShCmd(cmd, cfg, cwd, results):
|
||||
return exitCode
|
||||
|
||||
def executeScriptInternal(test, litConfig, tmpBase, commands, cwd):
|
||||
ln = ' &&\n'.join(commands)
|
||||
try:
|
||||
cmd = ShUtil.ShParser(ln, litConfig.isWindows).parse()
|
||||
except:
|
||||
return (Test.FAIL, "shell parser error on: %r" % ln)
|
||||
cmds = []
|
||||
for ln in commands:
|
||||
try:
|
||||
cmds.append(ShUtil.ShParser(ln, litConfig.isWindows).parse())
|
||||
except:
|
||||
return (Test.FAIL, "shell parser error on: %r" % ln)
|
||||
|
||||
cmd = cmds[0]
|
||||
for c in cmds[1:]:
|
||||
cmd = ShUtil.Seq(cmd, '&&', c)
|
||||
|
||||
results = []
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user