diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:35:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:35:28 +0000 |
commit | ea314d2f45c40a006c0104157013ab4b857f665f (patch) | |
tree | 3ef2971cb3675c318b8d9effd987854ad3f6d3e8 /tests/t-conffile-root-option/Makefile | |
parent | Initial commit. (diff) | |
download | dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.tar.xz dpkg-ea314d2f45c40a006c0104157013ab4b857f665f.zip |
Adding upstream version 1.22.4.upstream/1.22.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-conffile-root-option/Makefile')
-rw-r--r-- | tests/t-conffile-root-option/Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/t-conffile-root-option/Makefile b/tests/t-conffile-root-option/Makefile new file mode 100644 index 0000000..bd98cc7 --- /dev/null +++ b/tests/t-conffile-root-option/Makefile @@ -0,0 +1,39 @@ +TESTS_DEB := pkg-conff-a-1 pkg-conff-a-2 pkg-conff-b-1 pkg-conff-b-2 + +include ../Test.mk + +TEST_CASES += test-conffile-move-packages-no-rootdir +TEST_CASES += test-conffile-move-packages-rootdir + +test-case: $(TEST_CASES) + +test-conffile-move-packages-no-rootdir: + # Install base versions. + $(DPKG_INSTALL) pkg-conff-a-1.deb pkg-conff-b-1.deb + # Install update, conffile moves from a to b. + $(DPKG_INSTALL) pkg-conff-a-2.deb pkg-conff-b-2.deb + # Cleanup. + -$(DPKG_PURGE) pkg-conff-b + -$(DPKG_PURGE) pkg-conff-a + +TEST_ROOT := $(CURDIR)/target + +test-conffile-move-packages-rootdir: override DPKG_ADMINDIR = $(TEST_ROOT)/var/lib/dpkg +test-conffile-move-packages-rootdir: override DPKG_INSTDIR = $(TEST_ROOT) +test-conffile-move-packages-rootdir: + # Create template root dir. + mkdir -p $(DPKG_ADMINDIR)/info + mkdir -p $(DPKG_ADMINDIR)/updates + mkdir -p $(DPKG_ADMINDIR)/triggers + touch $(DPKG_ADMINDIR)/status + # Install base versions. + $(DPKG_INSTALL) pkg-conff-a-1.deb pkg-conff-b-1.deb + # Install update, conffile moves from a to b. + $(DPKG_INSTALL) pkg-conff-a-2.deb pkg-conff-b-2.deb + # Cleanup. + -$(DPKG_PURGE) pkg-conff-b + -$(DPKG_PURGE) pkg-conff-a + +test-clean: + -$(DPKG_PURGE) pkg-conff-a pkg-conff-b + -$(BEROOT) rm -rf $(TEST_ROOT) |