]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Preserve environment when running integration tests with sudo
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 10:41:34 +0000 (12:41 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 11:50:27 +0000 (13:50 +0200)
Otherwise we won't detect we're running in Github Actions and will
show the wrong command to fetch the journal.

.github/workflows/mkosi.yml

index be5f1edfee962cfaa2c69ecfbe45da43f826b1eb..c990a6acf0ed4a7906d351f35cfee636b6877202 100644 (file)
@@ -182,7 +182,7 @@ jobs:
       run: meson compile -C build mkosi
 
     - name: Run integration tests
-      run: sudo meson test -C build --no-rebuild --suite integration-tests --print-errorlogs --no-stdsplit --num-processes "$(($(nproc) - 1))"
+      run: sudo --preserve-env 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