diff -r 0ff5d46a8eba -r 1fe2beace503 SConstruct --- a/SConstruct Thu Feb 19 08:01:10 2015 +0000 +++ b/SConstruct Thu Feb 19 08:01:11 2015 +0000 @@ -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 0ff5d46a8eba -r 1fe2beace503 tests/SConscript --- a/tests/SConscript Thu Feb 19 08:01:10 2015 +0000 +++ b/tests/SConscript Thu Feb 19 08:01:11 2015 +0000 @@ -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.