mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
ci: Drop su -c usage
The `su -c` usage seems to be leftover from someone else's CI config that was used for inspiration. Drop it. Test suite in containers now run as root. The libvirt pieces and new test exclusions were what I needed to get the test suite working under root Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
27
.github/workflows/main.yml
vendored
27
.github/workflows/main.yml
vendored
@@ -119,33 +119,30 @@ jobs:
|
|||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Create user
|
|
||||||
run: |
|
|
||||||
useradd -m -s /bin/bash -G wheel guestfs
|
|
||||||
tail /etc/passwd
|
|
||||||
|
|
||||||
- name: Make checkout directory editable by the sscg user
|
|
||||||
run: |
|
|
||||||
chown -R guestfs:wheel ${GITHUB_WORKSPACE}
|
|
||||||
|
|
||||||
- name: Checkout submodule
|
- name: Checkout submodule
|
||||||
run: |
|
run: |
|
||||||
su -c 'git submodule update --init' guestfs
|
git config --global --add safe.directory $PWD
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
- name: Compile the code
|
- name: Compile the code
|
||||||
run: |
|
run: |
|
||||||
su -c '
|
|
||||||
autoreconf -fiv &&
|
autoreconf -fiv &&
|
||||||
./configure CFLAGS="-fPIC -g -O2" --enable-werror &&
|
./configure CFLAGS="-fPIC -g -O2" --enable-werror &&
|
||||||
make -j
|
make -j
|
||||||
' guestfs
|
|
||||||
|
|
||||||
- name: Run the quick test
|
- name: Run the quick test
|
||||||
run: |
|
run: |
|
||||||
su -c 'make quickcheck' guestfs
|
make quickcheck
|
||||||
|
|
||||||
|
- name: Sanity check libvirt connection
|
||||||
|
run: |
|
||||||
|
virtqemud --daemon
|
||||||
|
virsh uri
|
||||||
|
|
||||||
- name: Run the full tests
|
- name: Run the full tests
|
||||||
run: |
|
run: |
|
||||||
|
# https://github.com/libguestfs/libguestfs/issues/307
|
||||||
|
export SKIP_TEST_GUESTUNMOUNT_FD=1
|
||||||
# error: passt exited with status 1
|
# error: passt exited with status 1
|
||||||
export SKIP_TEST_NETWORK_SH=1
|
export SKIP_TEST_NETWORK_SH=1
|
||||||
# error: passt exited with status 1
|
# error: passt exited with status 1
|
||||||
@@ -153,9 +150,7 @@ jobs:
|
|||||||
# error: internal_autosync: umount: /sysroot: umount: /sysroot:
|
# error: internal_autosync: umount: /sysroot: umount: /sysroot:
|
||||||
# target is busy
|
# target is busy
|
||||||
export SKIP_RHBZ1011907_1165785_SH=1
|
export SKIP_RHBZ1011907_1165785_SH=1
|
||||||
# We have to set $HOME since su -p won't set it below.
|
if ! make check; then
|
||||||
export HOME=/home/guestfs
|
|
||||||
if ! su -p -c 'make check' guestfs; then
|
|
||||||
find -name test-suite.log -exec cat {} \;
|
find -name test-suite.log -exec cat {} \;
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user