PR10867: Analogue of r169441 for when using external 'sh'. And actually run the test!
[oota-llvm.git] / utils / lit / lit / TestRunner.py
index fa4880a593a6c891eb861a6b3f855a5c021b2d8f..652e8b499c5cd6521e76bff80627ae7d31f72c14 100644 (file)
@@ -357,7 +357,7 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
     if isWin32CMDEXE:
         f.write('\nif %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
     else:
-        f.write(' &&\n'.join(commands))
+        f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')
     f.write('\n')
     f.close()