config: enable setting SE-mode environment variables from file
This commit is contained in:
parent
483f873d01
commit
936768c8f4
2 changed files with 6 additions and 0 deletions
|
@ -234,6 +234,8 @@ def addSEOptions(parser):
|
|||
parser.add_option("-o", "--options", default="",
|
||||
help="""The options to pass to the binary, use " "
|
||||
around the entire string""")
|
||||
parser.add_option("-e", "--env", default="",
|
||||
help="Initialize workload environment from text file.")
|
||||
parser.add_option("-i", "--input", default="",
|
||||
help="Read stdin from a file.")
|
||||
parser.add_option("--output", default="",
|
||||
|
|
|
@ -94,6 +94,10 @@ def get_processes(options):
|
|||
process.executable = wrkld
|
||||
process.cwd = os.getcwd()
|
||||
|
||||
if options.env:
|
||||
with open(options.env, 'r') as f:
|
||||
process.env = [line.rstrip() for line in f]
|
||||
|
||||
if len(pargs) > idx:
|
||||
process.cmd = [wrkld] + pargs[idx].split()
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue