Commit fbf207fc authored by Marco Mariani's avatar Marco Mariani

pass extra parameters through the wrapper

parent e6b93ecf
......@@ -154,6 +154,7 @@ class BaseSlapRecipe:
self._writeExecutable(wrapper_path, file_content)
return wrapper_path
# XXX methinks the following method is unused / obsolete.
def createReportRunningWrapper(self, file_content):
"""Creates report runnig wrapper and returns its path"""
report_wrapper_path = os.path.join(self.wrapper_report_directory,
......
......@@ -127,7 +127,7 @@ class GenericBaseRecipe(object):
path, arguments=arguments)[0]
return script
def createWrapper(self, name, command, parameters, comments=[]):
def createWrapper(self, name, command, parameters, comments=[], parameters_extra=False):
"""
Creates a very simple (one command) shell script for process replacement.
Takes care of quoting.
......@@ -141,12 +141,17 @@ class GenericBaseRecipe(object):
lines.append('exec %s' % shlex.quote(command))
for param in parameters:
if len(lines[-1]) < 30:
if len(lines[-1]) < 40:
lines[-1] += ' ' + shlex.quote(param)
else:
lines[-1] += ' \\'
lines.append('\t' + shlex.quote(param))
if parameters_extra:
# pass-through further parameters
lines[-1] += ' \\'
lines.append('\t$@')
content = '\n'.join(lines) + '\n'
return self.createFile(name, content, 0700)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment