From 54ae09b100921041d60f61bee7f3a73280a79e35 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Wed, 18 Apr 2018 17:29:21 +0200 Subject: [PATCH] [IMP] tests: improve log when phantomjs crashes When phantomjs crashes, an error is logged only when the crash is a segfault. From time to time, we see on the runbot some crashes without any informations. When digging in the log files, it appears that the exit value of phantomjs is -6 (that could correspond to the SIGABRT signal). With this commit, the error message will clearly show the return code and, above all, it will show that the test failed due to a phantomjs crash. --- odoo/tests/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 3c4344b3a1e..cbfabf857d7 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -472,6 +472,8 @@ class HttpCase(TransactionCase): _logger.info("Phantom JS return code: %d" % phantom.returncode) if phantom.returncode == -SIGSEGV: _logger.error("Phantom JS has crashed (segmentation fault) during testing; log may not be relevant") + elif phantom.returncode < 0: + _logger.error("Phantom JS probably crashed (Phantom JS return code: %d)" % phantom.returncode) self._wait_remaining_requests()