From b01ff65c471dde6b77de384be21b761a86d7f1d1 Mon Sep 17 00:00:00 2001 From: Chris Smowton Date: Thu, 5 Oct 2017 11:25:01 +0100 Subject: [PATCH] Test.pl: exit if a test is interrupted In the specific case where a test died to SIGINT, we probably ought to stop. Contrast SIGTERM, SIGKILL and so on, where we will carry on. This also makes ctest exit cleanly when SIGINT'd --- regression/test.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/regression/test.pl b/regression/test.pl index c9a90edc333..608653d9b1a 100755 --- a/regression/test.pl +++ b/regression/test.pl @@ -45,6 +45,11 @@ ($$$$$) system "echo EXIT=$exit_value >>'$name/$output'"; system "echo SIGNAL=$signal_num >>'$name/$output'"; + if($signal_num == 2) { + print "\nProgram under test interrupted; stopping\n"; + exit 1; + } + return $failed; }