]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
[gha] Add a test log when the tests fail (#3971)
authorEmma Foley <elfiesmelfie@users.noreply.github.com>
Tue, 15 Feb 2022 11:41:38 +0000 (11:41 +0000)
committerGitHub <noreply@github.com>
Tue, 15 Feb 2022 11:41:38 +0000 (12:41 +0100)
* [ci][gha] Add a test log when the tests fail

* [ci][cirrus] Update CI to provide test logs on failure

Co-authored-by: Matthias Runge <mrunge@redhat.com>
.cirrus.yml
.github/workflows/build.yml

index bde86c351d2765a7e510da651181ecd344775dad..8df130b66ed8ed847cc6e9dd1b97635d63e10295 100644 (file)
@@ -61,7 +61,7 @@ debian_default_toolchain_task:
   build_script:
     - make -j2 -sk
   tests_script:
-    - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
+    - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check || cat ./test-suite.log || false
     - /checks/check-built-plugins.sh
 
 ###
@@ -92,7 +92,7 @@ redhat_default_toolchain_task:
   build_script:
     - make -j2 -sk
   tests_script:
-    - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
+    - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check || cat ./test-suite.log || false
     - /checks/check-built-plugins.sh
 
 
@@ -124,7 +124,7 @@ non_standard_toolchains_task:
       build_script:
         - make -j2 -sk
       tests_script:
-        - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
+        - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check || cat ./test-suite.log || false
 
     # build against libstatgrab, should always pass
     - env:
@@ -189,7 +189,7 @@ non_standard_toolchains_task:
       build_script:
         - make -j2 -sk
       tests_script:
-        - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
+        - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check || cat ./test-suite.log || false
 
 ###
 # Build using a range of compilers, available in debian/unstable. NB: might
@@ -221,4 +221,4 @@ bleeding_edge_compilers_task:
   build_script:
     - make -j2 -sk
   tests_script:
-    - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check
+    - VALGRIND_OPTS="--errors-for-leak-kinds=definite" make -j2 -sk check || cat ./test-suite.log || false
index cf6d0baadee326071b716bab181a13d184fb75c3..f7430769f0e87a5294be71ecd3961853d4b8789f 100644 (file)
@@ -55,6 +55,9 @@ jobs:
     - name: make check
       continue-on-error: true
       run: make check
+    - name: Dump test logs
+      run: |
+          cat ./test-suite.log || true
     - name: install bzip2
       continue-on-error: true
       run: |
@@ -104,6 +107,9 @@ jobs:
       # Make check is failing on a few newer distros, temporarily mark it as optional until that is resolved 
       continue-on-error: true
       run: make check
+    - name: Dump test logs
+      run: |
+          cat ./test-suite.log || true
     - name: install bzip2
       continue-on-error: true
       run: |