Skip to content

Commit

Permalink
fixed crash if no output folder is present because no output is expected
Browse files Browse the repository at this point in the history
  • Loading branch information
klingbolt committed Sep 30, 2024
1 parent c6b8caf commit 80b8536
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xml_converter/integration_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ def main() -> bool:
if testcase.expected_returncode is not None and testcase.expected_returncode != returncode:
print(f"Expected a return code of {testcase.expected_returncode} for {testcase.name} but got {returncode}")

testcase_passed &= diff_dirs(xml_output_dir_path, testcase.expected_output_xml_path)
testcase_passed &= diff_dirs(proto_output_dir_path, testcase.expected_output_proto_path)
if os.path.exists(testcase.expected_output_xml_path):
testcase_passed &= diff_dirs(xml_output_dir_path, testcase.expected_output_xml_path)
if os.path.exists(testcase.expected_output_proto_path):
testcase_passed &= diff_dirs(proto_output_dir_path, testcase.expected_output_proto_path)

if testcase_passed:
print(f"Success: test {testcase.name}")
Expand Down

0 comments on commit 80b8536

Please sign in to comment.