]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CI: enable parallel testing in CI builds
authorDan Fandrich <dan@coneharvesters.com>
Thu, 22 Jun 2023 17:03:16 +0000 (10:03 -0700)
committerViktor Szakats <commit@vsz.me>
Sat, 3 Aug 2024 14:12:44 +0000 (16:12 +0200)
The test-ci target now uses 2 processes by default, but the amount of
parallelism is tuned for each CI service and build environment based on
results of a number of test runs.  Some CI services use super-
oversubscribed build machines that can barely run the curl tests
already with no parallelism without frequently failing with
timing-induced failures. These continue to be run without parallelism.
Other services provide two fast, unloaded cores and these run with 14
processes, which is a good default for this kind of environment.

Here's a summary of the number of test processes by CI service:

  Appveyor - 2 (Windows MSVC), 1 (others)
  Azure - 2
  Circle CI - 14
  Cirrus - 28 (macOS), 14 (Linux), 7 (FreeBSD), 5 (macOS torture), 2 (Windows)
  GitHub Actions - 3 (macOS), 2 (Linux)

Some of these are a bit conservative to keep timing-induced flakiness down.

The net result is that the first test results should arrive only
3 minutes after a commit submission.

Changes merged via separate commits:
2a7c8b27fdd266894fe24d6d0f5d853ea843dff4 #14171
72341068a2d8f1b94a26add16830c725cc4054e6
efce544418971b064d9fc8183a6caa582c54559b #14244
c6cf411bacf97f230db160e543d0cc3bbe5b9aba

Ref: #10818
Closes #11510

appveyor.sh
tests/CMakeLists.txt
tests/Makefile.am

index a2925e647a9cff6c1fb3d4b867be6e0fc2325c1e..5f39dddd27f0f8f21a69c78e2bdf1151a685a777 100644 (file)
@@ -137,6 +137,7 @@ if [[ "${TFLAGS}" != 'skipall' ]] && \
   elif [ -x "$(cygpath 'C:/msys64/usr/bin/curl.exe')" ]; then
     TFLAGS+=" -ac $(cygpath 'C:/msys64/usr/bin/curl.exe')"
   fi
+  TFLAGS+=' -j0'
   if [ "${BUILD_SYSTEM}" = 'CMake' ]; then
     cmake --build _bld --config "${PRJ_CFG}" --target test-ci
   else
index 499d01150f9f885da3d2129d5aea1e77b39d2a06..8c40135ecbd64045c67ec5793dead47ad59346f4 100644 (file)
@@ -88,6 +88,6 @@ add_runtests(test-am        "-a -am")
 add_runtests(test-full      "-a -p -r")
 # ~flaky means that it'll ignore results of tests using the flaky keyword
 add_runtests(test-nonflaky  "-a -p ~flaky ~timing-dependent")
-add_runtests(test-ci        "-a -p ~flaky ~timing-dependent -r -rm")
+add_runtests(test-ci        "-a -p ~flaky ~timing-dependent -r -rm -j2")
 add_runtests(test-torture   "-a -t")
 add_runtests(test-event     "-a -e")
index 4b58fad24bd10b9ad68b67993800707b61f6bebd..54b9af66a83c189e7fc27ddcaa48ab20db717bb5 100644 (file)
@@ -133,7 +133,7 @@ TEST_E = -a -e
 TEST_NF = -a -p ~flaky ~timing-dependent
 
 # special CI target derived from nonflaky with CI-specific flags
-TEST_CI = $(TEST_NF) -r -rm
+TEST_CI = $(TEST_NF) -r -rm -j2
 endif
 
 CD2NROFF = $(top_srcdir)/scripts/cd2nroff $< >$@