changeset 9b71309d29f9 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9b71309d29f9
description:
        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:

 SConstruct       |  13 +++++++++----
 tests/SConscript |   2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 890269a13188 -r 9b71309d29f9 SConstruct
--- a/SConstruct        Mon Mar 02 04:00:28 2015 -0500
+++ b/SConstruct        Mon Mar 02 04:00:29 2015 -0500
@@ -784,10 +784,15 @@
 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
diff -r 890269a13188 -r 9b71309d29f9 tests/SConscript
--- a/tests/SConscript  Mon Mar 02 04:00:28 2015 -0500
+++ b/tests/SConscript  Mon Mar 02 04:00:29 2015 -0500
@@ -107,7 +107,7 @@
     # The slowest regression (bzip2) requires ~2.8 hours;
     # 4 hours was chosen to be conservative.
     elif env['TIMEOUT']:
-        cmd = 'timeout 4h %s' % cmd
+        cmd = 'timeout --foreground 4h %s' % cmd
 
     # Create a default value for the status string, changed as needed
     # based on the status.
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to