summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestSerialInDepends
diff options
context:
space:
mode:
authorAlex Sweet <asweet@ss8.com>2021-06-28 00:14:17 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-28 14:32:05 (GMT)
commita5011a2fbfe4ae1f04913fd490f49a1624c1e04d (patch)
treefcdbea751ddd4476d1cc402f5b00969b678f0c07 /Tests/CTestTestSerialInDepends
parentcd809b8ea4b21c459d79df228b9579b08ffd99fe (diff)
downloadCMake-a5011a2fbfe4ae1f04913fd490f49a1624c1e04d.zip
CMake-a5011a2fbfe4ae1f04913fd490f49a1624c1e04d.tar.gz
CMake-a5011a2fbfe4ae1f04913fd490f49a1624c1e04d.tar.bz2
Tests: Cleanup CTestTestSerialInDepends lockfile at test start
When any test under CTestTestSerialInDepends starts, delete the lockfile for that test in case it wasn't deleted at the end of the last test run. Fixes: #22351
Diffstat (limited to 'Tests/CTestTestSerialInDepends')
-rw-r--r--Tests/CTestTestSerialInDepends/test.ctest3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/CTestTestSerialInDepends/test.ctest b/Tests/CTestTestSerialInDepends/test.ctest
index 28ee094..cf0d314 100644
--- a/Tests/CTestTestSerialInDepends/test.ctest
+++ b/Tests/CTestTestSerialInDepends/test.ctest
@@ -2,6 +2,9 @@ set(CTEST_RUN_CURRENT_SCRIPT 0)
set(LOCK_FILE "${TEST_NAME}.lock")
+# Delete the old lock file in case it's lingering from a previous failed test run
+file(REMOVE "${LOCK_FILE}")
+
if("${TEST_NAME}" STREQUAL "i_want_to_be_alone")
file(GLOB LOCK_FILES *.lock)
if(LOCK_FILES)