Compare commits

...

3 Commits

Author SHA1 Message Date
GarmashAlex
c6bf3c777e
Merge c64c5313885af6a39a446749e059bc7dc6464c57 into cd8089c20baaaee329cbf7951195953a9f86d7cf 2025-03-16 17:15:02 +01:00
GarmashAlex
c64c531388
Update test_runner.py 2025-03-11 20:27:36 +03:00
GarmashAlex
a15bdf4efb
Update test_runner.py 2025-02-28 23:24:11 +03:00

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.