[testing] Show exit code hex value for failing tests
When a test fails the exit code of the process is printed in the logs in the decimal format. On Windows searching for the actual error is pretty difficult in this format since we are dealing with negative values errors. We print now the hex format of the same exit value next to the original one. Example failure of a test: https://ci.chromium.org/p/v8/builders/try/v8_win64_dbg/b8897355488287117696 https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8897355488287117696/+/steps/Check/0/stdout https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8897355488287117696/+/steps/Check/0/logs/RunWasmInterpreter_Int32Const_many/0 Bug: v8:9810 Change-Id: I51b65d6105bda6516707a764dbd41fd36c9dfc80 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903975 Commit-Queue: Liviu Rau <liviurau@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Tamer Tas <tmrts@chromium.org> Cr-Commit-Position: refs/heads/master@{#64878}
This commit is contained in:
parent
dc1d0796d5
commit
b990d2a4ad
@ -66,6 +66,10 @@ class Output(object):
|
||||
def IsSuccess(self):
|
||||
return not self.HasCrashed() and not self.HasTimedOut()
|
||||
|
||||
@property
|
||||
def exit_code_string(self):
|
||||
return "%d [%02X]" % (self.exit_code, self.exit_code & 0xffffffff)
|
||||
|
||||
|
||||
class _NullOutput(Output):
|
||||
"""Useful to signal that the binary has not been run."""
|
||||
|
@ -93,7 +93,7 @@ class SimpleProgressIndicator(ProgressIndicator):
|
||||
print(result.output.stdout.strip())
|
||||
print("Command: %s" % result.cmd.to_string())
|
||||
if result.output.HasCrashed():
|
||||
print("exit code: %d" % result.output.exit_code)
|
||||
print("exit code: %s" % result.output.exit_code_string)
|
||||
print("--- CRASHED ---")
|
||||
crashed += 1
|
||||
if result.output.HasTimedOut():
|
||||
@ -247,7 +247,7 @@ class CompactProgressIndicator(ProgressIndicator):
|
||||
print(self._templates['stderr'] % stderr)
|
||||
print("Command: %s" % result.cmd.to_string(relative=True))
|
||||
if output.HasCrashed():
|
||||
print("exit code: %d" % output.exit_code)
|
||||
print("exit code: %s" % output.exit_code_string)
|
||||
print("--- CRASHED ---")
|
||||
if output.HasTimedOut():
|
||||
print("--- TIMEOUT ---")
|
||||
|
Loading…
Reference in New Issue
Block a user