@@ -2,7 +2,7 @@ name: GnuTests
22
33# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
44# spell-checker:ignore (jargon) submodules devel
5- # spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
5+ # spell-checker:ignore (libs/utils) autopoint chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e zstd cpio
66# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
3131 TEST_STTY_FULL_SUMMARY_FILE : ' gnu-stty-full-result.json'
3232 TEST_SELINUX_FULL_SUMMARY_FILE : ' selinux-gnu-full-result.json'
3333 TEST_SELINUX_ROOT_FULL_SUMMARY_FILE : ' selinux-root-gnu-full-result.json'
34+ TEST_SMACK_FULL_SUMMARY_FILE : ' smack-gnu-full-result.json'
35+ TEST_SMACK_ROOT_FULL_SUMMARY_FILE : ' smack-root-gnu-full-result.json'
3436
3537jobs :
3638 native :
@@ -318,8 +320,59 @@ jobs:
318320 gnu/tests-selinux/*.log
319321 gnu/tests-selinux/*/*.log.gz
320322
323+ smack :
324+ name : Run GNU tests (SMACK)
325+ runs-on : ubuntu-24.04
326+ steps :
327+ - name : Checkout code (uutils)
328+ uses : actions/checkout@v6
329+ with :
330+ path : ' uutils'
331+ persist-credentials : false
332+ - uses : dtolnay/rust-toolchain@master
333+ with :
334+ toolchain : stable
335+ components : rustfmt
336+ - uses : Swatinem/rust-cache@v2
337+ with :
338+ workspaces : " ./uutils -> target"
339+ - name : Checkout code (GNU coreutils)
340+ run : (mkdir -p gnu && cd gnu && bash ../uutils/util/fetch-gnu.sh)
341+ - name : Install dependencies
342+ run : |
343+ sudo apt-get update
344+ sudo apt-get install -y qemu-system-x86 zstd cpio
345+ - name : Run GNU SMACK tests
346+ run : |
347+ cd uutils
348+ bash util/run-gnu-tests-smack-ci.sh "$GITHUB_WORKSPACE/gnu" "$GITHUB_WORKSPACE/gnu/tests-smack"
349+ - name : Extract testing info into JSON
350+ run : |
351+ python3 uutils/util/gnu-json-result.py gnu/tests-smack > ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
352+ # SMACK tests run as root in QEMU, so use same results for root
353+ cp ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }} ${{ env.TEST_SMACK_ROOT_FULL_SUMMARY_FILE }}
354+ - name : Upload SMACK json results
355+ uses : actions/upload-artifact@v5
356+ with :
357+ name : smack-gnu-full-result
358+ path : ${{ env.TEST_SMACK_FULL_SUMMARY_FILE }}
359+ - name : Upload SMACK root json results
360+ uses : actions/upload-artifact@v5
361+ with :
362+ name : smack-root-gnu-full-result
363+ path : ${{ env.TEST_SMACK_ROOT_FULL_SUMMARY_FILE }}
364+ - name : Compress SMACK test logs
365+ run : gzip gnu/tests-smack/*/*.log 2>/dev/null || true
366+ - name : Upload SMACK test logs
367+ uses : actions/upload-artifact@v5
368+ with :
369+ name : smack-test-logs
370+ path : |
371+ gnu/tests-smack/*.log
372+ gnu/tests-smack/*/*.log.gz
373+
321374 aggregate :
322- needs : [native, selinux]
375+ needs : [native, selinux, smack ]
323376 permissions :
324377 actions : read # for dawidd6/action-download-artifact to query and download artifacts
325378 contents : read # for actions/checkout to fetch code
@@ -384,6 +437,19 @@ jobs:
384437 name : selinux-root-gnu-full-result
385438 path : results
386439 merge-multiple : true
440+
441+ - name : Download smack json results
442+ uses : actions/download-artifact@v6
443+ with :
444+ name : smack-gnu-full-result
445+ path : results
446+ merge-multiple : true
447+ - name : Download smack root json results
448+ uses : actions/download-artifact@v6
449+ with :
450+ name : smack-root-gnu-full-result
451+ path : results
452+ merge-multiple : true
387453 - name : Extract/summarize testing info
388454 id : summary
389455 shell : bash
@@ -394,8 +460,8 @@ jobs:
394460 path_UUTILS='uutils'
395461
396462 json_count=$(ls -l results/*.json | wc -l)
397- if [[ "$json_count" -ne 5 ]]; then
398- echo "::error ::Failed to download all results json files (expected 4 files, found $json_count); failing early"
463+ if [[ "$json_count" -ne 7 ]]; then
464+ echo "::error ::Failed to download all results json files (expected 7 files, found $json_count); failing early"
399465 ls -lR results || true
400466 exit 1
401467 fi
0 commit comments