mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 14:58:03 +03:00
hg: run-tests: treat a parse error as return code 1
Summary: previously, unexpected output would cause the harness to stack trace and not show the actual test failure. This catches the error and treats it as a failed run, which causes the test output to be displayed. No more `ValueError: invalid literal for int() with base 10: '0\xe2\x90\x8a'` Reviewed By: DurhamG Differential Revision: D13995000 fbshipit-source-id: 5c1a9e8d6f8e81a924cdbf760fa75cdc0d33b74d
This commit is contained in:
parent
9efa79ce5c
commit
45a59ef1d4
@ -2000,7 +2000,10 @@ class TTest(Test):
|
||||
|
||||
if lcmd:
|
||||
# Add on last return code.
|
||||
try:
|
||||
ret = int(lcmd.split()[1])
|
||||
except ValueError:
|
||||
ret = 1
|
||||
if ret != 0:
|
||||
postout.append(b" [%d]\n" % ret)
|
||||
if pos in after:
|
||||
|
Loading…
Reference in New Issue
Block a user