summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-03-02 04:00:29 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-03-02 04:00:29 -0500
commiteed0795f3abf6da71ba62307ae29c975b4ad9246 (patch)
tree790221e88ff3fa5e19d9614db5b4d6b93eb3c356 /SConstruct
parent3b4ae7debb58e4f3fc4a5f2ad9f7faf896f854d8 (diff)
downloadgem5-eed0795f3abf6da71ba62307ae29c975b4ad9246.tar.xz
tests: Run regression timeout as foreground
Allow the user to send signals such as Ctrl C to the gem5 runs. Note that this assumes coreutils >= 8.13, which aligns with Ubuntu 12.04 and RHE6.
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct13
1 files changed, 9 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 6a163f762..c51c7b28c 100755
--- a/SConstruct
+++ b/SConstruct
@@ -784,10 +784,15 @@ if main['GCC'] and compareVersions(gcc_version, '4.9') >= 0 and \
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
+# Check for 'timeout' from GNU coreutils. If present, regressions will
+# be run with a time limit. We require version 8.13 since we rely on
+# support for the '--foreground' option.
+timeout_lines = readCommand(['timeout', '--version'],
+ exception='').splitlines()
+# Get the first line and tokenize it
+timeout_version = timeout_lines[0].split() if timeout_lines else []
+main['TIMEOUT'] = timeout_version and \
+ compareVersions(timeout_version[-1], '8.13') >= 0
# filter out all existing swig scanners, they mess up the dependency
# stuff for some reason