From a15bdf4efb41d35e4b2f1625dc25dc93162f4dc9 Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Fri, 28 Feb 2025 23:24:11 +0300 Subject: [PATCH] Update test_runner.py --- test/util/test_runner.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/util/test_runner.py b/test/util/test_runner.py index cac184ca302..ce75470f88e 100755 --- a/test/util/test_runner.py +++ b/test/util/test_runner.py @@ -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.