From: Tom Coldrick Date: Thu, 20 Jun 2024 09:26:24 +0000 (+0100) Subject: sysupdate: Add integration test for updatectl updates X-Git-Tag: v257-rc1~658^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F32363%2Fhead;p=thirdparty%2Fsystemd.git sysupdate: Add integration test for updatectl updates --- diff --git a/test/TEST-72-SYSUPDATE/meson.build b/test/TEST-72-SYSUPDATE/meson.build index 8dec5f37e73..77370ce4588 100644 --- a/test/TEST-72-SYSUPDATE/meson.build +++ b/test/TEST-72-SYSUPDATE/meson.build @@ -3,5 +3,6 @@ integration_tests += [ integration_test_template + { 'name' : fs.name(meson.current_source_dir()), + 'vm' : true, }, ] diff --git a/test/units/TEST-72-SYSUPDATE.sh b/test/units/TEST-72-SYSUPDATE.sh index 5e658e04856..3f4aa5ce8a0 100755 --- a/test/units/TEST-72-SYSUPDATE.sh +++ b/test/units/TEST-72-SYSUPDATE.sh @@ -6,8 +6,10 @@ set -eux set -o pipefail SYSUPDATE=/lib/systemd/systemd-sysupdate +SYSUPDATED=/lib/systemd/systemd-sysupdated SECTOR_SIZES=(512 4096) WORKDIR="$(mktemp -d /var/tmp/test-72-XXXXXX)" +CONFIGDIR="/run/sysupdate.d" BACKING_FILE="$WORKDIR/joined.raw" export SYSTEMD_ESP_PATH="$WORKDIR/esp" export SYSTEMD_XBOOTLDR_PATH="$WORKDIR/xbootldr" @@ -28,6 +30,17 @@ if [[ ! -e /dev/loop-control ]]; then SECTOR_SIZES=(512) fi +# Set up sysupdated drop-in pointing at the correct definitions and setting +# no verification of images. +mkdir -p /run/systemd/system/systemd-sysupdated.service.d +cat >/run/systemd/system/systemd-sysupdated.service.d/override.conf<"$WORKDIR/defs/01-first.conf" <"$CONFIGDIR/01-first.conf" <"$WORKDIR/defs/02-second.conf" <"$CONFIGDIR/02-second.conf" <"$WORKDIR/defs/03-third.conf" <"$CONFIGDIR/03-third.conf" <"$WORKDIR/defs/04-fourth.conf" <"$CONFIGDIR/04-fourth.conf" <"$WORKDIR/defs/05-fifth.conf" <"$CONFIGDIR/05-fifth.conf" <"$WORKDIR/defs/02-second.conf" <"$CONFIGDIR/02-second.conf" <"$WORKDIR/defs/03-third.conf" <"$CONFIGDIR/03-third.conf" <