This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=476341e96d323b8c4b023545c5d640677cf35e64 commit 476341e96d323b8c4b023545c5d640677cf35e64 Author: Guillem Jover <[email protected]> AuthorDate: Sun Jan 3 23:04:50 2021 +0100 Fix test cases to support DPKG_ROOT --- t-deb-lfs/Makefile | 4 ++-- t-dir-leftover-conffile/Makefile | 4 ++-- t-dir-leftover-deadlock/Makefile | 4 ++-- t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postinst | 2 +- t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postrm | 2 +- t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postinst | 2 +- t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postrm | 2 +- t-dir-shared-replaces-lost/Makefile | 6 +++--- t-symlink-dir/Makefile | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/t-deb-lfs/Makefile b/t-deb-lfs/Makefile index fffda5846..4e45e1f05 100644 --- a/t-deb-lfs/Makefile +++ b/t-deb-lfs/Makefile @@ -23,12 +23,12 @@ test-case: # test Small File Support packages $(DPKG_INSTALL) pkg-sfs.deb $(call pkg_is_installed,pkg-sfs) - test "`stat -c%s /small-file`" = "4096" + test "`stat -c%s '$(DPKG_INSTDIR)/small-file'`" = "4096" # test Large File Support packages $(DPKG_INSTALL) pkg-lfs.deb $(call pkg_is_installed,pkg-lfs) - test "`stat -c%s /large-file`" = "5368709120" + test "`stat -c%s '$(DPKG_INSTDIR)/large-file'`" = "5368709120" test-clean: $(DPKG_PURGE) pkg-sfs diff --git a/t-dir-leftover-conffile/Makefile b/t-dir-leftover-conffile/Makefile index bddd8446c..28ac9e91e 100644 --- a/t-dir-leftover-conffile/Makefile +++ b/t-dir-leftover-conffile/Makefile @@ -6,8 +6,8 @@ test-case: $(DPKG_INSTALL) pkg-dir-leftover-conffile.deb $(DPKG_REMOVE) pkg-dir-leftover-conffile $(DPKG_PURGE) pkg-dir-leftover-conffile - test ! -d /test-dir + test ! -d '$(DPKG_INSTDIR)/test-dir' test-clean: $(DPKG_PURGE) pkg-dir-leftover-conffile - $(BEROOT) rm -rf /test-dir + $(BEROOT) rm -rf '$(DPKG_INSTDIR)/test-dir' diff --git a/t-dir-leftover-deadlock/Makefile b/t-dir-leftover-deadlock/Makefile index 825d3312a..e0f381f35 100644 --- a/t-dir-leftover-deadlock/Makefile +++ b/t-dir-leftover-deadlock/Makefile @@ -9,9 +9,9 @@ test-case: $(DPKG_REMOVE) pkg-dir-shared-0 $(DPKG_PURGE) pkg-dir-shared-0 $(DPKG_PURGE) pkg-dir-shared-1 - test ! -d /test-dir + test ! -d '$(DPKG_INSTDIR)/test-dir' test-clean: $(DPKG_PURGE) pkg-dir-shared-0 $(DPKG_PURGE) pkg-dir-shared-1 - $(BEROOT) rm -rf /test-dir + $(BEROOT) rm -rf '$(DPKG_INSTDIR)/test-dir' diff --git a/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postinst b/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postinst index 0d6010757..328e575aa 100755 --- a/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postinst +++ b/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postinst @@ -2,6 +2,6 @@ case "$1" in configure) - touch /test-dir/test-config-0 + touch "$DPKG_ROOT/test-dir/test-config-0" ;; esac diff --git a/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postrm b/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postrm index e87eb72c8..1a1e745c4 100755 --- a/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postrm +++ b/t-dir-leftover-deadlock/pkg-dir-shared-0/DEBIAN/postrm @@ -2,6 +2,6 @@ case "$1" in purge) - rm /test-dir/test-config-0 + rm "$DPKG_ROOT/test-dir/test-config-0" ;; esac diff --git a/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postinst b/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postinst index 1a2a5069e..ba38c6786 100755 --- a/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postinst +++ b/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postinst @@ -2,6 +2,6 @@ case "$1" in configure) - touch /test-dir/test-config-1 + touch "$DPKG_ROOT/test-dir/test-config-1" ;; esac diff --git a/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postrm b/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postrm index 6b33b0354..3358b3754 100755 --- a/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postrm +++ b/t-dir-leftover-deadlock/pkg-dir-shared-1/DEBIAN/postrm @@ -2,6 +2,6 @@ case "$1" in purge) - rm /test-dir/test-config-1 + rm "$DPKG_ROOT/test-dir/test-config-1" ;; esac diff --git a/t-dir-shared-replaces-lost/Makefile b/t-dir-shared-replaces-lost/Makefile index 356d82259..17b2b2685 100644 --- a/t-dir-shared-replaces-lost/Makefile +++ b/t-dir-shared-replaces-lost/Makefile @@ -10,7 +10,7 @@ test-case: $(TEST_CASES) define VERIFY $(call pkg_is_installed,pkg-dir-original) $(call pkg_is_installed,pkg-dir-takeover) -test -d /test-dir +test -d '$(DPKG_INSTDIR)/test-dir' test "`$(DPKG_QUERY) -S /test-dir/test-original`" = "pkg-dir-original: /test-dir/test-original" test "`$(DPKG_QUERY) -S /test-dir/test-takeover`" = "pkg-dir-takeover: /test-dir/test-takeover" endef @@ -18,7 +18,7 @@ endef test-ordered: # test-ordered $(DPKG_INSTALL) pkg-dir-original.deb - $(BEROOT) rm -rf /test-dir + $(BEROOT) rm -rf '$(DPKG_INSTDIR)/test-dir' $(DPKG_INSTALL) pkg-dir-takeover.deb $(VERIFY) $(DPKG_PURGE) pkg-dir-original pkg-dir-takeover @@ -26,7 +26,7 @@ test-ordered: test-reverse: # test-reverse $(DPKG_INSTALL) pkg-dir-takeover.deb - $(BEROOT) rm -rf /test-dir + $(BEROOT) rm -rf '$(DPKG_INSTDIR)/test-dir' $(DPKG_INSTALL) pkg-dir-original.deb $(VERIFY) $(DPKG_PURGE) pkg-dir-original pkg-dir-takeover diff --git a/t-symlink-dir/Makefile b/t-symlink-dir/Makefile index 82a7d01a8..afe8829a2 100644 --- a/t-symlink-dir/Makefile +++ b/t-symlink-dir/Makefile @@ -12,10 +12,10 @@ test-case: $(DPKG_PURGE) pkg-file $(DPKG_PURGE) pkg-dir-real - test ! -L /test-symlink + test ! -L '$(DPKG_INSTDIR)/test-symlink' test-clean: $(DPKG_PURGE) pkg-dir-symlink $(DPKG_PURGE) pkg-file $(DPKG_PURGE) pkg-dir-real - $(BEROOT) $(RM) -f /test-symlink + $(BEROOT) $(RM) -f '$(DPKG_INSTDIR)/test-symlink' -- Dpkg.Org's dpkg

