summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2014-08-25 14:32:00 -0500
committerCurtis Dunham <Curtis.Dunham@arm.com>2014-08-25 14:32:00 -0500
commite553ca67d419f62098acdba68c3b48eba769dcc5 (patch)
tree550d7414608b1e7b538a573844d90249f71097bc /SConstruct
parent4f0e3cd4d70a2f852c9ca50fcfdc2684787c8771 (diff)
downloadgem5-e553ca67d419f62098acdba68c3b48eba769dcc5.tar.xz
tests: automatically kill regressions that take too long
When GNU coreutils 'timeout' is available, limit each regression simulation to 4 hours.
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct5
1 files changed, 5 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 9a64840fc..138df137f 100755
--- a/SConstruct
+++ b/SConstruct
@@ -752,6 +752,11 @@ if compareVersions(swig_version[2], min_swig_version) < 0:
swig_flags=Split('-c++ -python -modern -templatereduce $_CPPINCFLAGS')
main.Append(SWIGFLAGS=swig_flags)
+# Check for 'timeout' from GNU coreutils. If present, regressions
+# will be run with a time limit.
+TIMEOUT_version = readCommand(['timeout', '--version'], exception=False)
+main['TIMEOUT'] = TIMEOUT_version and TIMEOUT_version.find('timeout') == 0
+
# filter out all existing swig scanners, they mess up the dependency
# stuff for some reason
scanners = []