From c9102fd79c4ebfd126dd8008cf4aa119918d8ddd Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Mon, 20 Oct 2014 13:52:02 +0100 Subject: [PATCH] Unittest - SIGABORT was not being correctly identified * In Python if the process receives a signal, the exit code is negative --- test/basetest/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/basetest/exceptions.py b/test/basetest/exceptions.py index 6191b1d27..f1f753109 100644 --- a/test/basetest/exceptions.py +++ b/test/basetest/exceptions.py @@ -9,7 +9,7 @@ class CommandError(Exception): "\n*** Start STDOUT ***\n{2}\n*** End STDOUT ***\n" "\n*** Start STDERR ***\n{3}\n*** End STDERR ***\n" ) - if code == signal.SIGABRT: + if code == -signal.SIGABRT: self.msg = ("Command '{0}' was aborted, likely due to not " "finishing in due time. The exit code was '{1}'.\n" ) + msg_suffix