[PATCH] D20854: [test-suite] Use shellcommand.wrap() when adding the run_under command

silviu.baranga@arm.com via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 04:41:34 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL271661: [test-suite] Use shellcommand.wrap() when adding the run_under command (authored by sbaranga).

Changed prior to commit:
  http://reviews.llvm.org/D20854?vs=59530&id=59531#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20854

Files:
  test-suite/trunk/litsupport/run_under.py

Index: test-suite/trunk/litsupport/run_under.py
===================================================================
--- test-suite/trunk/litsupport/run_under.py
+++ test-suite/trunk/litsupport/run_under.py
@@ -3,7 +3,19 @@
 
 
 def mutateCommandLine(context, commandline):
-    return context.config.run_under + " " + commandline
+    cmd = shellcommand.parse(commandline)
+    run_under_cmd = shellcommand.parse(context.config.run_under)
+
+    if (run_under_cmd.stdin is not None or
+        run_under_cmd.stdout is not None or
+        run_under_cmd.stderr is not None or
+        run_under_cmd.workdir is not None or
+        run_under_cmd.envvars):
+        raise Exception("invalid run_under argument!")
+
+    cmd.wrap(run_under_cmd.executable, run_under_cmd.arguments)
+
+    return cmd.toCommandline()
 
 
 def mutatePlan(context, plan):


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20854.59531.patch
Type: text/x-patch
Size: 847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160603/b4814fa0/attachment.bin>


More information about the llvm-commits mailing list