From e553ca67d419f62098acdba68c3b48eba769dcc5 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Mon, 25 Aug 2014 14:32:00 -0500 Subject: tests: automatically kill regressions that take too long When GNU coreutils 'timeout' is available, limit each regression simulation to 4 hours. --- SConstruct | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'SConstruct') 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 = [] -- cgit v1.2.3