summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2008-08-04 00:48:11 -0400
committerSteve Reinhardt <stever@gmail.com>2008-08-04 00:48:11 -0400
commit6f92e9b8d4c1aa366a7570faa57ac8120037c9c4 (patch)
treeb0bb583d9c518aa7dec1607f59709c0186acb5d7
parentfe8aeff362844838c60ff31e444573fb7e9a7793 (diff)
downloadgem5-6f92e9b8d4c1aa366a7570faa57ac8120037c9c4.tar.xz
Make test/SConscript use new redirection options.
-rw-r--r--tests/SConscript17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/SConscript b/tests/SConscript
index 62c4d0508..af11195cc 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -178,23 +178,18 @@ def test_builder(env, ref_dir):
# referring to files via SOURCES and TARGETS so that scons can
# mess with paths all it wants to and we still get the right
# files.
- 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
# Prefix test run with batch job submission command if appropriate.
- # Output redirection is also different for batch runs.
# Batch command also supports timeout arg (in seconds, not minutes).
- timeout = 15 # used to be a param, probably should be again
+ timeout = 15 * 60 # used to be a param, probably should be again
if env['BATCH']:
- 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)
env.Command([tgt('stdout'), tgt('stderr'), new_stats],
- [env.M5Binary, 'run.py'], ' '.join(cmd))
+ [env.M5Binary, 'run.py'], cmd)
# order of targets is important... see check_test
env.Command([tgt('outdiff'), tgt('statsdiff'), status_file],