]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CI/makefiles: introduce dedicated test target
authorMarc Hoersken <info@marc-hoersken.de>
Mon, 27 Sep 2021 19:17:29 +0000 (21:17 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Fri, 8 Oct 2021 18:16:15 +0000 (20:16 +0200)
Make it easy to use the same set of test flags
throughout all current and future CI builds.

Reviewed-by: Jay Satiro
Follow up to #7690
Closes #7785

.azure-pipelines.yml
.circleci/config.yml
.cirrus.yml
.github/workflows/linux-hyper.yml
.github/workflows/macos.yml
Makefile.am
appveyor.yml
tests/CMakeLists.txt
tests/Makefile.am

index 0c724f5697dfe2c111bc0c700f40d59665b7ccca..2070b407fad5075fec5b42a1adfe4196759da111 100644 (file)
@@ -199,8 +199,8 @@ stages:
     - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
       displayName: 'install'
 
-    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-nonflaky"
+    - script: $(container_cmd) -l -c "cd $(echo '%cd%') && make V=1 test-ci"
       displayName: 'test'
       env:
         AZURE_ACCESS_TOKEN: "$(System.AccessToken)"
-        TFLAGS: "-r -rm -u !SCP $(tests)"
+        TFLAGS: "!SCP $(tests)"
index 67372b6582bd7508c49416be5155f9b9ef369aec..485deca7af650a3f5dd38fe234964ef9bea73cd7 100644 (file)
@@ -37,7 +37,7 @@ commands:
 
   test:
     steps:
-      - run: make test-nonflaky
+      - run: make test-ci
 
 executors:
   ubuntu:
index b19f20d653e2261cfede7da4f6ff2ff7b0257b94..4c770a2a0430117999a719546322b5408e6a6fe1 100644 (file)
@@ -129,4 +129,4 @@ windows_task:
   install_script: |
     %container_cmd% -l -c "cd $(echo '%cd%') && make V=1 install && PATH=/usr/bin:/bin find . -type f -path '*/.libs/*.exe' -print -execdir mv -t .. {} \;"
   test_script: |
-    %container_cmd% -l -c "cd $(echo '%cd%') && make V=1 TFLAGS='-r -rm -u !SCP %tests%' test-nonflaky"
+    %container_cmd% -l -c "cd $(echo '%cd%') && make V=1 TFLAGS='!SCP %tests%' test-ci"
index cfff476e9ae9865362dcffb9a6219c1795f16135..4464059424fc409aa96c6439097bf3a9d05194d4 100644 (file)
@@ -41,7 +41,7 @@ jobs:
     - run: ./buildconf && LDFLAGS="-Wl,-rpath,$HOME/hyper/target/debug" ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} && make
       name: 'configure and build'
 
-    - run: make test-nonflaky
+    - run: make test-ci
       name: 'test'
       env:
         LD_LIBRARY_PATH: $HOME/hyper/target/debug:/usr/local/lib
index af80da6249b65cf37a17e07b125db8eee41c0767..28f52f4eb3caba4be1abf6df9187640788878160 100644 (file)
@@ -84,7 +84,7 @@ jobs:
     - run: make
       name: 'make'
 
-    - run: make test-nonflaky
+    - run: make test-ci
       name: 'test'
       env:
         TFLAGS: "${{ matrix.build.tflags }} ~1452"
index 16adc983391cb8ff38ada4c8eb2e63d599ed5590..ca605368dc593ec20efcda95d61ceb41895e8231 100644 (file)
@@ -248,6 +248,9 @@ test-event:
 test-am:
        @(cd tests; $(MAKE) all am-test)
 
+test-ci:
+       @(cd tests; $(MAKE) all ci-test)
+
 endif
 
 examples:
index 02358833210d601676f89de75825e6a26dd6e849..d3c48a92ad7bb7269de2bd1b1971049fc608facf 100644 (file)
@@ -299,11 +299,11 @@ build_script:
 test_script:
     - if %TESTING%==ON (
         if %BUILD_SYSTEM%==CMake (
-          set TFLAGS=-r -rm -u %DISABLED_TESTS% &&
-          cmake --build . --config %PRJ_CFG% --target test-nonflaky
+          set TFLAGS=%DISABLED_TESTS% &&
+          cmake --build . --config %PRJ_CFG% --target test-ci
         ) else (
         if %BUILD_SYSTEM%==autotools (
-          bash.exe -e -l -c "cd /c/projects/curl && make V=1 TFLAGS='-r -rm -u %DISABLED_TESTS%' test-nonflaky"
+          bash.exe -e -l -c "cd /c/projects/curl && make V=1 TFLAGS='%DISABLED_TESTS%' test-ci"
         ) else (
           bash.exe -e -l -c "cd /c/projects/curl/tests && ./runtests.pl -a -p !flaky -r -rm -u %DISABLED_TESTS%"
         ))
index acd53d3e79a672cd252207847d60bbcd6b476f3c..8b2a12c70ad1ef99752f8a7bc1c69cd729974322 100644 (file)
@@ -46,5 +46,6 @@ add_runtests(test-am        "-a -am")
 add_runtests(test-full      "-a -p -r")
 # !flaky means that it'll skip all tests using the flaky keyword
 add_runtests(test-nonflaky  "-a -p !flaky")
+add_runtests(test-ci        "-a -p !flaky -r -rm -u")
 add_runtests(test-torture   "-a -t")
 add_runtests(test-event     "-a -e")
index 8f47bb017c827690206c6e737b127ed1959f50a6..6e72e629484f7d0952dcd1952a6c732211562f1d 100644 (file)
@@ -71,6 +71,9 @@ TEST_E = -a -e
 
 # !flaky means that it'll skip all tests using the flaky keyword
 TEST_NF = -a -p !flaky
+
+# special CI target derived from nonflaky with CI-specific flags
+TEST_CI = $(TEST_NF) -r -rm -u
 endif
 
 # make sure that PERL is pointing to an executable
@@ -86,6 +89,9 @@ quiet-test: perlcheck all
 am-test: perlcheck all
        $(TEST) $(TEST_AM) $(TFLAGS)
 
+ci-test: perlcheck all
+       $(TEST) $(TEST_CI) $(TFLAGS)
+
 full-test: perlcheck all
        $(TEST) $(TEST_F) $(TFLAGS)