Commit 95c8c042 authored by Philip Withnall's avatar Philip Withnall

ci: Relax the requirement about running as root

We can use `sudo` inside the script instead, which means the following
commit can introduce a non-root user to run the build under, which means
we get to cache things in an existent home directory.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <>
parent 8b600ae9
......@@ -12,20 +12,14 @@ case "$1" in
# FIXME: The tests need to be run as root
if ! [ $(id -u) = 0 ]; then
echo "Tests need to be run as root"
exit 1
# FIXME: The tests should be isolated and use mock services so they do not
# require a functioning system bus. This will have to do for now though.
mkdir -p /run/dbus
mkdir -p /var
ln -s /var/run /run
dbus-daemon --system --fork
/usr/lib/polkit-1/polkitd --no-debug &
/usr/libexec/fwupd/fwupd --verbose &
sudo mkdir -p /run/dbus
sudo mkdir -p /var
sudo ln -s /var/run /run
sudo dbus-daemon --system --fork
sudo /usr/lib/polkit-1/polkitd --no-debug &
sudo /usr/libexec/fwupd/fwupd --verbose &
meson test \
-C _build \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment