llvm.org GIT mirror llvm / 00fb9c4
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169441 91177308-0d34-0410-b5e6-96231b3b80d8 Richard Smith 8 years ago
2 changed file(s) with 19 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 // This test should fail. lit used to interpret this as:
1 // (false && false) || true
2 // instead of the intended
3 // false && (false || true
4 //
5 // RUN: false
6 // RUN: false || true
7 //
8 // XFAIL: *
240240 return exitCode
241241
242242 def executeScriptInternal(test, litConfig, tmpBase, commands, cwd):
243 ln = ' &&\n'.join(commands)
244 try:
245 cmd = ShUtil.ShParser(ln, litConfig.isWindows).parse()
246 except:
247 return (Test.FAIL, "shell parser error on: %r" % ln)
243 cmds = []
244 for ln in commands:
245 try:
246 cmds.append(ShUtil.ShParser(ln, litConfig.isWindows).parse())
247 except:
248 return (Test.FAIL, "shell parser error on: %r" % ln)
249
250 cmd = cmds[0]
251 for c in cmds[1:]:
252 cmd = ShUtil.Seq(cmd, '&&', c)
248253
249254 results = []
250255 try: