1# -*- mode:python -*- 2 3# Copyright (c) 2004-2006 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 164 unchanged lines hidden (view full) --- 173 ref_stats = os.path.join(ref_dir, 'm5stats.txt') 174 new_stats = tgt('m5stats.txt') 175 status_file = tgt('status') 176 177 # Base command for running test. We mess around with indirectly 178 # referring to files via SOURCES and TARGETS so that scons can 179 # mess with paths all it wants to and we still get the right 180 # files. |
181 cmd = '${SOURCES[0]} -d $TARGET.dir' 182 cmd += ' -re --stdout-file ${TARGETS[0]} --stderr-file ${TARGETS[1]}' 183 cmd += ' ${SOURCES[1]} %s' % tgt_dir |
184 185 # Prefix test run with batch job submission command if appropriate. |
186 # Batch command also supports timeout arg (in seconds, not minutes). |
187 timeout = 15 * 60 # used to be a param, probably should be again |
188 if env['BATCH']: |
189 cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd) |
190 191 env.Command([tgt('stdout'), tgt('stderr'), new_stats], |
192 [env.M5Binary, 'run.py'], cmd) |
193 194 # order of targets is important... see check_test 195 env.Command([tgt('outdiff'), tgt('statsdiff'), status_file], 196 [ref_stats, new_stats], 197 testAction) 198 199 # phony target to echo status 200 if env['update_ref']: --- 33 unchanged lines hidden --- |