Call tool_script.sh with shell

This commit is contained in:
mvdbeek
2019-06-01 13:24:51 +02:00
parent a763c89180
commit bf31260192
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ def __externalize_commands(job_wrapper, shell, commands_builder, remote_command_
tool_commands
)
write_script(local_container_script, script_contents, config)
commands = local_container_script
commands = "%s %s" % (shell, local_container_script)
if 'working_directory' in remote_command_params:
commands = "%s %s" % (shell, join(remote_command_params['working_directory'], script_name))
commands += " > ../tool_stdout 2> ../tool_stderr"
+5 -1
View File
@@ -45,7 +45,11 @@ class TestCommandFactory(TestCase):
self.include_work_dir_outputs = False
dep_commands = [". /opt/galaxy/tools/bowtie/default/env.sh"]
self.job_wrapper.dependency_shell_commands = dep_commands
self.__assert_command_is(_surround_command("%s/tool_script.sh > ../tool_stdout 2> ../tool_stderr; return_code=$?" % self.job_wrapper.working_directory))
self.__assert_command_is(_surround_command(
"%s %s/tool_script.sh > ../tool_stdout 2> ../tool_stderr; return_code=$?" % (
self.job_wrapper.shell,
self.job_wrapper.working_directory,
)))
self.__assert_tool_script_is("#!/bin/sh\n%s; %s" % (dep_commands[0], MOCK_COMMAND_LINE))
def test_remote_dependency_resolution(self):