aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-02-19 11:54:38 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-02-23 08:38:19 -0800
commit8a12115741185a007c1dd0d172af98bb42052146 (patch)
tree0c9f0eccb7687320bd493c630585a8aef5bade05 /run_project_tests.py
parent44d5ea2a1f2fd93c50162932e7fdf20cc0168ddb (diff)
downloadmeson-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
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py2
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