diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py index 00432b8d31778..d6a0d26b47043 100644 --- a/llvm/utils/lit/lit/TestRunner.py +++ b/llvm/utils/lit/lit/TestRunner.py @@ -1216,6 +1216,8 @@ def executeScript(test, litConfig, tmpBase, commands, cwd): commands[i] = match.expand( "echo '\\1' > nul && " if command else "echo '\\1' > nul" ) + if command: + commands[i] += command f.write("@echo on\n") f.write("\n@if %ERRORLEVEL% NEQ 0 EXIT\n".join(commands)) else: