From: Diane Trout Date: Thu, 14 Aug 2008 20:58:15 +0000 (+0000) Subject: In trying to get scripts/srf to work I needed to set subprocess.Popen to X-Git-Tag: stanford.caltech-merged-database-2009-jan-15~42 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=0be0edaa665df1d1d222cb34610c4a454034c8d5 In trying to get scripts/srf to work I needed to set subprocess.Popen to 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. --- diff --git a/gaworkflow/util/test/test_queuecommands.py b/gaworkflow/util/test/test_queuecommands.py index 940ddbe..6c54c04 100644 --- a/gaworkflow/util/test/test_queuecommands.py +++ b/gaworkflow/util/test/test_queuecommands.py @@ -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)