Update test_runner.py

This commit is contained in:
GarmashAlex 2025-02-28 23:24:11 +03:00 committed by GitHub
parent 3c1f72a367
commit a15bdf4efb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,6 +164,11 @@ def bctest(testDir, testObj, buildenv):
if want_error not in res.stderr:
logging.error(f"Error mismatch:\nExpected: {want_error}\nReceived: {res.stderr.rstrip()}\nres: {str(res)}")
raise Exception
else:
# If no error is expected, stderr should be empty except for known cases
if res.stderr and not (testObj.get("exec") == "./bitcoin-tx" and "wine" in os.environ.get("WINEPREFIX", "")):
logging.error(f"Unexpected stderr output when no error expected:\n{res.stderr.rstrip()}\nres: {str(res)}")
raise Exception
def parse_output(a, fmt):
"""Parse the output according to specified format.