[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.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user