diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-12-05 14:01:08 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-12-05 16:43:11 +0100 |
commit | e022e73e3fede1a8d7800a6ca87291ca4075681b (patch) | |
tree | f520ee53213d41b258a01745639c1a54f809578f /.github | |
parent | mkosi: update opensuse packaging commit due to force push (diff) | |
download | systemd-e022e73e3fede1a8d7800a6ca87291ca4075681b.tar.xz systemd-e022e73e3fede1a8d7800a6ca87291ca4075681b.zip |
test: Implement TEST_PREFER_QEMU and use it in one of the mkosi jobs
We want to make sure the integration tests that don't require qemu
can run successfully both in an nspawn container and in a qemu VM.
So let's add one more knob TEST_PREFER_QEMU=1 to run jobs that normally
require nspawn in qemu instead.
Running these tests in qemu is also possible by not running as root but
that's very implicit so we add an explicit knob instead to make it explicit
that we want to run these in qemu instead of nspawn.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/mkosi.yml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml index 156b8bae89..7d39e501a9 100644 --- a/.github/workflows/mkosi.yml +++ b/.github/workflows/mkosi.yml @@ -60,48 +60,56 @@ jobs: llvm: 0 cflags: "-O2 -D_FORTIFY_SOURCE=3" relabel: no + qemu: 1 - distro: debian release: testing sanitizers: "" llvm: 0 cflags: "-Og" relabel: no + qemu: 0 - distro: ubuntu release: noble sanitizers: "" llvm: 0 cflags: "-Og" relabel: no + qemu: 0 - distro: fedora release: "41" sanitizers: "" llvm: 0 cflags: "-Og" relabel: yes + qemu: 0 - distro: fedora release: rawhide sanitizers: address,undefined llvm: 1 cflags: "-Og" relabel: yes + qemu: 0 - distro: opensuse release: tumbleweed sanitizers: "" llvm: 0 cflags: "-Og" relabel: no + qemu: 0 - distro: centos release: "9" sanitizers: "" llvm: 0 cflags: "-Og" relabel: yes + qemu: 0 - distro: centos release: "10" sanitizers: "" llvm: 0 cflags: "-Og" relabel: yes + qemu: 0 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 @@ -210,7 +218,7 @@ jobs: run: sudo meson compile -C build mkosi - name: Run integration tests - run: sudo --preserve-env meson test -C build --no-rebuild --suite integration-tests --print-errorlogs --no-stdsplit --num-processes "$(($(nproc) - 1))" + run: sudo --preserve-env env TEST_PREFER_QEMU=${{ matrix.qemu }} meson test -C build --no-rebuild --suite integration-tests --print-errorlogs --no-stdsplit --num-processes "$(($(nproc) - 1))" - name: Archive failed test journals uses: actions/upload-artifact@v4 |