Kaynağa Gözat

Merge topic 'ci-bzr-p4'

c4b305da63 ci: Explicitly enable CTest.Update{BZR,CVS,GIT,HG,P4,SVN} tests
f9526f39a1 ci: Add bzr and p4 to Debian and Fedora base images
6f7580c7ad Tests: Run CTest.UpdateP4 tests only if explicitly enabled
c737367e92 Tests: Print p4.log on server failure in CTest.UpdateP4
787495bb74 Tests: Preemptively create test HOME .bazaar directory

Acked-by: Kitware Robot <[email protected]>
Merge-request: !7014
Brad King 4 yıl önce
ebeveyn
işleme
9c215c38b6

+ 5 - 0
.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 "")

+ 9 - 0
.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 "")

+ 8 - 0
.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 "")

+ 1 - 0
.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

+ 8 - 0
.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

+ 8 - 0
.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

+ 3 - 3
.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"

+ 4 - 7
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)
@@ -2671,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()

+ 2 - 1
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
-)
+)