Merge c64c5313885af6a39a446749e059bc7dc6464c57 into 5f4422d68dc3530c353af1f87499de1c864b60ad

This commit is contained in:
GarmashAlex 2025-03-17 03:51:50 +01:00 committed by GitHub
commit 4fdd29b332
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,7 +156,6 @@ def bctest(testDir, testObj, buildenv):
if "error_txt" in testObj:
want_error = testObj["error_txt"]
# Compare error text
# TODO: ideally, we'd compare the strings exactly and also assert
# That stderr is empty if no errors are expected. However, bitcoin-tx
# emits DISPLAY errors when running as a windows application on
# linux through wine. Just assert that the expected error text appears
@ -164,6 +163,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.