[llvm] [lit] Echo full RUN lines in case of external shells (PR #65267)
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 4 08:57:54 PDT 2023
================
@@ -1153,8 +1153,14 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
for j, ln in enumerate(commands):
match = re.match(kPdbgRegex, ln)
if match:
+ dbg = match.group(1)
command = match.group(2)
- commands[j] = match.expand(": '\\1'; \\2" if command else ": '\\1'")
+ commands[j] = f"echo '{dbg}'"
+ if command:
+ commands[j] += f": {shlex.quote(command.lstrip())} >&2 " \
+ f"&& {command}"
+ else:
+ commands[j] += " has no command after substitutions"
----------------
RoboTux wrote:
Could you add a testcase for this codepath? Thanks!
https://github.com/llvm/llvm-project/pull/65267
More information about the llvm-commits
mailing list