Skip to content

Commit

Permalink
chore(lean/run_tests): ensure the basename directories are cleaned up
Browse files Browse the repository at this point in the history
Restovers can remains due to spurious failures as we are not catching
exceptions in the middle that may prevent the final `rm` to run.

If we are not doing that, the next run will cause EEXIST errors.

Signed-off-by: Raito Bezarius <[email protected]>
  • Loading branch information
RaitoBezarius committed Jan 16, 2025
1 parent 4e0b68f commit 6e30ca2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/lean/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def test_lean():
basename = os.path.splitext(os.path.basename(filename))[0]
tests[filename] = os.fork()
if tests[filename] == 0:
step('rm -r {} || true'.format(basename))
step('mkdir -p {}'.format(basename))
step('\'{}\' {} --lean --lean-output-dir {}'.format(sail, filename, basename))
step('diff {}/out/Out.lean {}.expected.lean'.format(basename, basename))
Expand Down

0 comments on commit 6e30ca2

Please sign in to comment.