From 8606585ca1a6a97aaa81562969a0d8e4a201412c Mon Sep 17 00:00:00 2001 From: Kunal Bhargava Date: Mon, 3 Jun 2024 16:32:07 +0000 Subject: [PATCH] folder for failed protobufs --- src/test_suite/test_suite.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test_suite/test_suite.py b/src/test_suite/test_suite.py index e8837d8..ab5c00a 100644 --- a/src/test_suite/test_suite.py +++ b/src/test_suite/test_suite.py @@ -357,6 +357,10 @@ def diff_effect_wrapper(a, b): log_dir = globals.output_dir / target.stem log_dir.mkdir(parents=True, exist_ok=True) + # Make failed protobuf directory + failed_protobufs_dir = globals.output_dir / "failed_protobufs" + failed_protobufs_dir.mkdir(parents=True, exist_ok=True) + test_cases = list(input_dir.iterdir()) num_test_cases = len(test_cases) @@ -410,6 +414,9 @@ def diff_effect_wrapper(a, b): elif status == -1: failed += 1 failed_tests.append(file_stem) + failed_protobufs = list(input_dir.glob(f'{file_stem}*')) + for failed_protobuf in failed_protobufs: + shutil.copy(failed_protobuf, failed_protobufs_dir) print("Cleaning up...") for target in shared_libraries: