diff toolfactory/rgToolFactory2.py @ 129:c35ff02652bf draft

Uploaded
author fubar
date Sun, 04 Apr 2021 06:36:14 +0000
parents 98c8a76b3638
children e8e8071c9d0c
line wrap: on
line diff
--- a/toolfactory/rgToolFactory2.py	Tue Mar 30 02:51:51 2021 +0000
+++ b/toolfactory/rgToolFactory2.py	Sun Apr 04 06:36:14 2021 +0000
@@ -20,6 +20,7 @@
 import logging
 import os
 import re
+import shlex
 import shutil
 import subprocess
 import sys
@@ -191,8 +192,10 @@
             aCL(self.sfile)
             aXCL("$runme")
         else:
-            aCL(self.executeme[0])
-            aXCL(self.executeme[0])
+            for ex in self.executeme:
+                aCL(ex)
+                aXCL(ex)
+
         self.elog = os.path.join(self.repdir, "%s_error_log.txt" % self.tool_name)
         self.tlog = os.path.join(self.repdir, "%s_runner_log.txt" % self.tool_name)
         if self.args.parampass == "0":
@@ -204,8 +207,8 @@
             else:
                 self.prepargp()
                 self.clargparse()
-        if self.args.cl_prefix:  # DIY CL end - misnamed!
-            clp = self.args.cl_prefix.split(" ")
+        if self.args.cl_suffix:  # DIY CL end
+            clp = shlex.split(self.args.cl_suffix)
             for c in clp:
                 aCL(c)
                 aXCL(c)
@@ -398,6 +401,9 @@
                 k = "--%s" % k
             aCL(k)
             aCL(v)
+        if self.lastxclredirect:
+            aXCL(self.lastxclredirect[0])
+            aXCL(self.lastxclredirect[1])
 
     def getNdash(self, newname):
         if self.is_positional:
@@ -598,7 +604,7 @@
             )
             collect.append(disc)
             self.toutputs.append(collect)
-            tparm = gxtp.TestOutput(newname, ftype="pdf")
+            tparm = gxtp.TestOutputCollection(newname)
             self.testparam.append(tparm)
 
     def doNoXMLparam(self):
@@ -1036,7 +1042,7 @@
     a = parser.add_argument
     a("--script_path", default=None)
     a("--history_test", default=None)
-    a("--cl_prefix", default=None)
+    a("--cl_suffix", default=None)
     a("--sysexe", default=None)
     a("--packages", default=None)
     a("--tool_name", default="newtool")