]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: github: show results of the Unit tests
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 6 Mar 2025 20:02:02 +0000 (21:02 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 6 Mar 2025 20:23:54 +0000 (21:23 +0100)
Add a "Show Unit-Tests results" section which show each unit test which
failed by displaying their result file.

.github/workflows/vtest.yml

index c9bc131adb8cbf306e409e3b684ca1176d1a8fb2..64b1507d588c31179f1f5444e70e36039e279a7a 100644 (file)
@@ -146,10 +146,6 @@ jobs:
         ulimit -n 65536
         ulimit -c unlimited
         make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
-    - name: Run Unit tests
-      id: unittests
-      run: |
-        make unit-tests
     - name: Show VTest results
       if: ${{ failure() && steps.vtest.outcome == 'failure' }}
       run: |
@@ -160,7 +156,19 @@ jobs:
           echo "::endgroup::"
         done
         exit 1
-
+    - name: Run Unit tests
+      id: unittests
+      run: |
+        make unit-tests
+    - name: Show Unit-Tests results
+      if: ${{ failure() && steps.unittests.outcome == 'failure' }}
+      run: |
+        for result in ${TMPDIR:-/tmp}/ha-unittests-*/results/res.*; do
+          printf "::group::"
+          cat $result
+          echo "::endgroup::"
+        done
+        exit 1
     - name: Show coredumps
       if: ${{ failure() && steps.vtest.outcome == 'failure' }}
       run: |