181,184c181,183
< base_cmd = '${SOURCES[0]} -d $TARGET.dir ${SOURCES[1]} %s' % tgt_dir
< # stdout and stderr files
< cmd_stdout = '${TARGETS[0]}'
< cmd_stderr = '${TARGETS[1]}'
---
> cmd = '${SOURCES[0]} -d $TARGET.dir'
> cmd += ' -re --stdout-file ${TARGETS[0]} --stderr-file ${TARGETS[1]}'
> cmd += ' ${SOURCES[1]} %s' % tgt_dir
187d185
< # Output redirection is also different for batch runs.
189c187
< timeout = 15 # used to be a param, probably should be again
---
> timeout = 15 * 60 # used to be a param, probably should be again
191,194c189
< cmd = [env['BATCH_CMD'], '-t', str(timeout * 60),
< '-o', cmd_stdout, '-e', cmd_stderr, base_cmd]
< else:
< cmd = [base_cmd, '>', cmd_stdout, '2>', cmd_stderr]
---
> cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd)
197c192
< [env.M5Binary, 'run.py'], ' '.join(cmd))
---
> [env.M5Binary, 'run.py'], cmd)