From c24c0bdd18896f2d58d6ac2bcfc18ee0596d0ba2 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 16 Jan 2025 14:16:35 +0100 Subject: [PATCH] chore(lean/run_tests): ensure the basename directories are cleaned up 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 --- test/lean/run_tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lean/run_tests.py b/test/lean/run_tests.py index 83d41c234..8094ddd16 100755 --- a/test/lean/run_tests.py +++ b/test/lean/run_tests.py @@ -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))