diff options
author | Brad King <brad.king@kitware.com> | 2022-02-21 23:20:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-22 15:03:38 (GMT) |
commit | 787495bb745be11b2c025b6311837527713f125d (patch) | |
tree | 7764037687403a52f46cc4af8a9513f831071f18 | |
parent | 176407736ec13715f42d6a696daa5f4779eeec4c (diff) | |
download | CMake-787495bb745be11b2c025b6311837527713f125d.zip CMake-787495bb745be11b2c025b6311837527713f125d.tar.gz CMake-787495bb745be11b2c025b6311837527713f125d.tar.bz2 |
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.
-rw-r--r-- | Tests/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
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) |