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 From c737367e92ef4f1b4cefcc0ead4d3f36ee1cd957 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 Feb 2022 13:05:28 -0500 Subject: Tests: Print p4.log on server failure in CTest.UpdateP4 --- Tests/CTestUpdateP4.cmake.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/CTestUpdateP4.cmake.in b/Tests/CTestUpdateP4.cmake.in index 5eef9fb..8a99e67 100644 --- a/Tests/CTestUpdateP4.cmake.in +++ b/Tests/CTestUpdateP4.cmake.in @@ -66,6 +66,7 @@ for i in 1 2 3 4 5 6 7 8 9 10; do fi done echo 'Gave up waiting for server to start.' +sed 's/^/ /' '${P4_ROOT}/p4.log' " ) endif() @@ -258,4 +259,4 @@ message("Shutting down p4d") run_child( WORKING_DIRECTORY ${TOP} COMMAND ${P4CMD} admin stop -) \ No newline at end of file +) -- cgit v0.12 From 6f7580c7ad7de056088a617b212e221e45f5d528 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 Feb 2022 13:57:16 -0500 Subject: Tests: Run CTest.UpdateP4 tests only if explicitly enabled The test occasionally fails with "Gave up waiting for server to start". Drop our heuristic so we can enable it only on specific builds. --- Tests/CMakeLists.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8151bfe..65f72c5 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2674,16 +2674,10 @@ if(BUILD_TESTING) endif() # Test CTest Update with P4 - if(NOT DEFINED CMake_TEST_CTestUpdate_P4 OR CMake_TEST_CTestUpdate_P4) + if(CMake_TEST_CTestUpdate_P4) find_program(P4_EXECUTABLE NAMES p4) find_program(P4D_EXECUTABLE NAMES p4d) mark_as_advanced(P4_EXECUTABLE P4D_EXECUTABLE) - endif() - if(NOT DEFINED CMake_TEST_CTestUpdate_P4 AND P4_EXECUTABLE AND P4D_EXECUTABLE - AND (UNIX OR NOT "${P4_EXECUTABLE};${P4D_EXECUTABLE}" MATCHES "cygwin")) - set(CMake_TEST_CTestUpdate_P4 1) - endif() - if(CMake_TEST_CTestUpdate_P4) if(NOT P4_EXECUTABLE OR NOT P4D_EXECUTABLE) message(FATAL_ERROR "CMake_TEST_CTestUpdate_HG enabled but P4_EXECUTABLE and P4D_EXECUTABLE are not both not found.") endif() -- cgit v0.12 From f9526f39a10da53563fe056480a1fdc505de5f97 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Feb 2022 17:06:38 -0500 Subject: ci: Add bzr and p4 to Debian and Fedora base images Perforce does not provide binaries for `aarch64`, so leave it out for that architecture. Fedora now packages `breezy` instead of the original `bzr`. Note that breezy does not have the xmloutput plugin needed for `bzr log --xml`. This is also why commit 1972a75536 (Tests: Drop CTestUpdate.BZR test check for xmloutput plugin, 2022-02-04) observed that there is no `bzr xmlplugins` command. --- .gitlab/ci/docker/debian10-aarch64/install_deps.sh | 1 + .gitlab/ci/docker/debian10/install_deps.sh | 8 ++++++++ .gitlab/ci/docker/fedora35/install_deps.sh | 8 ++++++++ .gitlab/os-linux.yml | 6 +++--- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh index d5c5e22..21f0b16 100755 --- a/.gitlab/ci/docker/debian10-aarch64/install_deps.sh +++ b/.gitlab/ci/docker/debian10-aarch64/install_deps.sh @@ -25,6 +25,7 @@ apt-get install -y \ # Packages needed to test CTest. apt-get install -y \ + bzr bzr-xmloutput \ cvs \ subversion \ mercurial diff --git a/.gitlab/ci/docker/debian10/install_deps.sh b/.gitlab/ci/docker/debian10/install_deps.sh index d3d6b67..12a91e6 100755 --- a/.gitlab/ci/docker/debian10/install_deps.sh +++ b/.gitlab/ci/docker/debian10/install_deps.sh @@ -25,6 +25,7 @@ apt-get install -y \ # Packages needed to test CTest. apt-get install -y \ + bzr bzr-xmloutput \ cvs \ subversion \ mercurial @@ -89,4 +90,11 @@ curl -L -O https://github.com/IronLanguages/ironpython2/releases/download/ipy-2. dpkg -i ironpython_2.7.10.deb rm ironpython_2.7.10.deb +# Perforce +curl -L -O https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz +echo '72620c55e9389705582506d6f3388005fb4f674888a00a12a51edc2ae37823b3 helix-core-server.tgz' > helix.sha256sum +sha256sum --check helix.sha256sum +tar -C /usr/local/bin -xvzf helix-core-server.tgz -- p4 p4d +rm helix-core-server.tgz + apt-get clean diff --git a/.gitlab/ci/docker/fedora35/install_deps.sh b/.gitlab/ci/docker/fedora35/install_deps.sh index 30214af..038000c 100755 --- a/.gitlab/ci/docker/fedora35/install_deps.sh +++ b/.gitlab/ci/docker/fedora35/install_deps.sh @@ -38,6 +38,7 @@ dnf install --setopt=install_weak_deps=False -y \ # Packages needed to test CTest. dnf install --setopt=install_weak_deps=False -y \ + breezy \ subversion \ mercurial @@ -106,3 +107,10 @@ curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py python2 get-pip.py rm get-pip.py pip2.7 install numpy + +# Perforce +curl -L -O https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz +echo '72620c55e9389705582506d6f3388005fb4f674888a00a12a51edc2ae37823b3 helix-core-server.tgz' > helix.sha256sum +sha256sum --check helix.sha256sum +tar -C /usr/local/bin -xvzf helix-core-server.tgz -- p4 p4d +rm helix-core-server.tgz diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index a2da7f9..5e620f5 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -45,7 +45,7 @@ ### Debian .debian10: - image: "kitware/cmake:ci-debian10-x86_64-2021-11-18" + image: "kitware/cmake:ci-debian10-x86_64-2022-02-21" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -60,7 +60,7 @@ CMake_SKIP_INSTALL: 1 .debian10_aarch64: - image: "kitware/cmake:ci-debian10-aarch64-2021-11-18" + image: "kitware/cmake:ci-debian10-aarch64-2022-02-21" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -69,7 +69,7 @@ ### Fedora .fedora35: - image: "kitware/cmake:ci-fedora35-x86_64-2022-02-01" + image: "kitware/cmake:ci-fedora35-x86_64-2022-02-21" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes" -- cgit v0.12 From c4b305da6390f4fd08dcb60e490f8807b72911b2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Feb 2022 17:57:35 -0500 Subject: ci: Explicitly enable CTest.Update{BZR,CVS,GIT,HG,P4,SVN} tests Avoid relying on heuristics to enable these tests. Be sure they run in CI where expected. --- .gitlab/ci/configure_debian10_aarch64_ninja.cmake | 5 +++++ .gitlab/ci/configure_debian10_ninja.cmake | 9 +++++++++ .gitlab/ci/configure_fedora35_makefiles.cmake | 8 ++++++++ 3 files changed, 22 insertions(+) diff --git a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake index 8e03eef..5431ab7 100644 --- a/.gitlab/ci/configure_debian10_aarch64_ninja.cmake +++ b/.gitlab/ci/configure_debian10_aarch64_ninja.cmake @@ -1,3 +1,8 @@ +set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_CVS "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_HG "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_SVN "ON" CACHE BOOL "") set(CMake_TEST_FindALSA "ON" CACHE BOOL "") set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") set(CMake_TEST_FindBoost "ON" CACHE BOOL "") diff --git a/.gitlab/ci/configure_debian10_ninja.cmake b/.gitlab/ci/configure_debian10_ninja.cmake index d50ab1f..1be5381 100644 --- a/.gitlab/ci/configure_debian10_ninja.cmake +++ b/.gitlab/ci/configure_debian10_ninja.cmake @@ -1,3 +1,12 @@ +set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_CVS "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_HG "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_SVN "ON" CACHE BOOL "") +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_CTestUpdate_P4 "ON" CACHE BOOL "") +endif() + set(CMake_TEST_FindALSA "ON" CACHE BOOL "") set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") set(CMake_TEST_FindBoost "ON" CACHE BOOL "") diff --git a/.gitlab/ci/configure_fedora35_makefiles.cmake b/.gitlab/ci/configure_fedora35_makefiles.cmake index a482378..91ed55b 100644 --- a/.gitlab/ci/configure_fedora35_makefiles.cmake +++ b/.gitlab/ci/configure_fedora35_makefiles.cmake @@ -1,3 +1,11 @@ +set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_HG "ON" CACHE BOOL "") +set(CMake_TEST_CTestUpdate_SVN "ON" CACHE BOOL "") +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_CTestUpdate_P4 "ON" CACHE BOOL "") +endif() + set(CMake_TEST_FindALSA "ON" CACHE BOOL "") set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") set(CMake_TEST_FindBoost "ON" CACHE BOOL "") -- cgit v0.12