Skip to content

Commit

Permalink
folder for failed protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
kbhargava-jump committed Jun 3, 2024
1 parent 824db0a commit 8606585
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test_suite/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8606585

Please sign in to comment.