]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: Add a way to quickly iterate on an integration test 33912/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 2 Aug 2024 14:25:03 +0000 (16:25 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 Aug 2024 13:13:38 +0000 (15:13 +0200)
commitaf153e36ae67c242251951c12d6d6b6ae4783845
treeddd998cf6aab5eafe6791f17bdb7ad6daef07441
parentedc6592e532806fe9ac28400138d5d4e1492a7d0
test: Add a way to quickly iterate on an integration test

Rebuilding the integration test every time is very slow. Let's
introduce a way to iterate on an integration test without rebuilding
the image every time. By making a btrfs snapshot before we run the
integration test, we can then systemctl soft-reboot after running
the test to restore the rootfs to a pristine state before running
the test again.

As /run/nextroot will get nuked on reboot or soft-reboot, we introduce
a tmpfiles snippet to make sure it is recreated every (soft-)reboot
and adapt the existing tests to deal with this new symlink.
mkosi.extra/usr/lib/tmpfiles.d/snapshot.conf [new file with mode: 0644]
test/README.testsuite
test/integration-test-setup.sh [new file with mode: 0755]
test/meson.build
test/test.service.in
test/units/TEST-09-REBOOT.sh
test/units/TEST-82-SOFTREBOOT.sh