In trying to get scripts/srf to work I needed to set subprocess.Popen to
authorDiane Trout <diane@caltech.edu>
Thu, 14 Aug 2008 20:58:15 +0000 (20:58 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 14 Aug 2008 20:58:15 +0000 (20:58 +0000)
shell=True, the end result of that is that at least on linux hosts
passing in a list of arguments to Popen doesn't work very well, Popen
needs a string.

Perhaps a better solution would be for queuecommand to take a
shell parameter and if that's true do the joining into a string.

but for the moment I just converted my test case to pass a string
instead of a list.

gaworkflow/util/test/test_queuecommands.py

index 940ddbe7208a6572ebdb78ad428749399f17517d..6c54c045b38ed51ee28eed86016650f94984aad1 100644 (file)
@@ -17,9 +17,9 @@ class testQueueCommands(unittest.TestCase):
         """
         Run everything at once
         """
-        cmds = [['/bin/sleep', '0'],
-                ['/bin/sleep', '1'],
-                ['/bin/sleep', '2'],]
+        cmds = ['/bin/sleep 0',
+                '/bin/sleep 1',
+                '/bin/sleep 2',]
 
         q = QueueCommands(cmds)
         start = time.time()
@@ -33,9 +33,9 @@ class testQueueCommands(unittest.TestCase):
         """
         Run a limited number of jobs
         """
-        cmds = [['/bin/sleep', '1'],
-                ['/bin/sleep', '2'],
-                ['/bin/sleep', '3'],]
+        cmds = ['/bin/sleep 1',
+                '/bin/sleep 2',
+                '/bin/sleep 3',]
 
         q = QueueCommands(cmds, 2)