diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-02-19 11:54:38 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-02-23 08:38:19 -0800 |
commit | 8a12115741185a007c1dd0d172af98bb42052146 (patch) | |
tree | 0c9f0eccb7687320bd493c630585a8aef5bade05 | |
parent | 44d5ea2a1f2fd93c50162932e7fdf20cc0168ddb (diff) | |
download | meson-8a12115741185a007c1dd0d172af98bb42052146.zip meson-8a12115741185a007c1dd0d172af98bb42052146.tar.gz meson-8a12115741185a007c1dd0d172af98bb42052146.tar.bz2 |
run_project_tests: Delete a build directory if it already exists
This can happen if you abort a run before the cleanup finishes
-rwxr-xr-x | run_project_tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 2c2b963..ed1a0e8 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -461,6 +461,8 @@ def create_deterministic_builddir(test: TestDef, use_tmpdir: bool) -> str: src_dir += test.name rel_dirname = 'b ' + hashlib.sha256(src_dir.encode(errors='ignore')).hexdigest()[0:10] abs_pathname = os.path.join(tempfile.gettempdir() if use_tmpdir else os.getcwd(), rel_dirname) + if os.path.exists(abs_pathname): + mesonlib.windows_proof_rmtree(abs_pathname) os.mkdir(abs_pathname) return abs_pathname |