]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CI: Collect logs of failed unit tests (#2348)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Tue, 13 Jan 2026 16:15:58 +0000 (16:15 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 13 Jan 2026 18:02:36 +0000 (18:02 +0000)
When a unit test fails during CI checks, the corresponding GitHub
Actions reports and collected btlayer-*.log files do not contain
any failure details. For example, we see

    FAIL: tests/testRock
    # FAIL: 1

but are missing critical details like

    stub time| FATAL: Ipc::Mem::Segment::create failed to
    shm_open(/squid-0-tr_rebuild_versions.shm): (63) File name too long

Now, GitHub Actions collect all log files, including unit test logs. For
the `ubuntu-24.04,gcc,default` build target, adding more logs increases
artifacts zip archive size by about 100 KB (from ~200KB to ~300KB).

If `test-builds.sh` succeeds, there are no unit test logs to collect
because all unit test logs are erased when `make distcheck` (initiated
by `test-builds.sh`) reaches its `make distclean` step. If a unit test
fails, then that cleaning step is not reached, (successful and failed)
unit test logs are preserved and are now added to CI artifacts.

.github/workflows/quick.yaml
.github/workflows/slow.yaml

index af217e0542d3bfd2480fabb6f03e234dcb35e865..ee7dc28a39b9d16d3102ba31ad2e10d8762f98c2 100644 (file)
@@ -171,7 +171,7 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: build-logs-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }}
-          path: btlayer-*.log
+          path: "**/*.log"
 
   CodeQL-tests:
 
index f5739b3ca381032f803cf7b76716d39668476eaf..68216242b8612440bbce50faebcd227efceace2c 100644 (file)
@@ -84,7 +84,7 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: build-logs-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }}
-          path: btlayer-*.log
+          path: "**/*.log"
 
   macos:
     runs-on: macos-14
@@ -140,7 +140,7 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: build-logs-macos
-          path: btlayer-*.log
+          path: "**/*.log"
 
   freebsd:
     strategy:
@@ -185,7 +185,7 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: build-logs-freebsd-${{ matrix.osversion }}
-          path: btlayer-*.log
+          path: "**/*.log"
 
   openbsd:
     runs-on: ubuntu-24.04
@@ -244,4 +244,4 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: build-logs-openbsd
-          path: btlayer-*.log
+          path: "**/*.log"