From a18c6e9c34fe1f93f5917bf1f9b6819c0be639f8 Mon Sep 17 00:00:00 2001 From: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:09:59 -0400 Subject: [PATCH] Expect no line difference with _Unwind --- ci/speedtest.py | 4 ++-- ci/test-all-configs.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci/speedtest.py b/ci/speedtest.py index 3980399..93627f0 100644 --- a/ci/speedtest.py +++ b/ci/speedtest.py @@ -17,13 +17,13 @@ def main(): threshold = 100 # ms if expect_slow: - if time > 100: + if time > threshold: print(f"Success (expecting slow): Test program took {time} ms") else: print(f"Error (expecting slow): Test program took {time} ms") sys.exit(1) else: - if time > 100: + if time > threshold: print(f"Error: Test program took {time} ms") sys.exit(1) else: diff --git a/ci/test-all-configs.py b/ci/test-all-configs.py index 9a3d3d4..8bc6876 100644 --- a/ci/test-all-configs.py +++ b/ci/test-all-configs.py @@ -78,13 +78,17 @@ def output_matches(output: str, params: Tuple[str]): expected = [line.strip().split("||") for line in expected.split("\n")] output = [line.strip().split("||") for line in output.split("\n")] + max_line_diff = MAX_LINE_DIFF + if "CPPTRACE_UNWIND_WITH_UNWIND" in params: + max_line_diff = 0 + errored = False for i, ((output_file, output_line, output_symbol), (expected_file, expected_line, expected_symbol)) in enumerate(zip(output, expected)): if output_file != expected_file: print(f"Error: File name mismatch on line {i + 1}, found \"{output_file}\" expected \"{expected_file}\"") errored = True - if abs(int(output_line) - int(expected_line)) > MAX_LINE_DIFF: + if abs(int(output_line) - int(expected_line)) > max_line_diff: print(f"Error: File line mismatch on line {i + 1}, found {output_line} expected {expected_line}") errored = True if output_symbol != expected_symbol: