From 787495bb745be11b2c025b6311837527713f125d Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Feb 2022 18:20:46 -0500 Subject: Tests: Preemptively create test HOME .bazaar directory Occasionally one of the `CTest.UpdateBZR` tests fails with: bzr: ERROR: [...] File exists: '/.../Tests/CMakeFiles/TestHome/.bazaar' Create the directory ahead of time to eliminate any chance of a time-of-check-time-of-use race. --- Tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8ebe5ed..8151bfe 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2604,6 +2604,9 @@ if(BUILD_TESTING) # Test CTest Update with BZR if(CMake_TEST_CTestUpdate_BZR) + if(TEST_HOME) + file(MAKE_DIRECTORY "${TEST_HOME}/.bazaar") + endif() find_program(BZR_EXECUTABLE NAMES bzr) mark_as_advanced(BZR_EXECUTABLE) if(NOT BZR_EXECUTABLE) -- cgit v0.12