From 2ba5af6d8321058bcdc1b081b6710d547993509b Mon Sep 17 00:00:00 2001 From: Goswin von Brederlow Date: Mon, 19 May 2014 17:00:09 +0200 Subject: [PATCH] Set an alarm(60) in setup_test_environment() when not on windows so tests will not block too long if they go wrong. --- tests/testutil.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 7e468673..2d17b57d 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -262,6 +262,9 @@ void setup_test_environment() _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); # endif +#else + // abort test after 60 seconds + alarm(60); #endif }