diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:40:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:40:31 +0000 |
commit | b86570f63e533abcbcb97c2572e0e5732a96307b (patch) | |
tree | cabc83be691530ae685c45a8bc7620ccc0e1ebdf /tests/t-unpack-hardlink/Makefile | |
parent | Initial commit. (diff) | |
download | dpkg-b86570f63e533abcbcb97c2572e0e5732a96307b.tar.xz dpkg-b86570f63e533abcbcb97c2572e0e5732a96307b.zip |
Adding upstream version 1.20.13.upstream/1.20.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-unpack-hardlink/Makefile')
-rw-r--r-- | tests/t-unpack-hardlink/Makefile | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/t-unpack-hardlink/Makefile b/tests/t-unpack-hardlink/Makefile new file mode 100644 index 0000000..3412ca5 --- /dev/null +++ b/tests/t-unpack-hardlink/Makefile @@ -0,0 +1,56 @@ +PKG := pkg-hardlink + +TESTS_DEB := $(PKG) + +include ../Test.mk + +$(PKG)/test-conffile-link0: + echo "test hard linked conffile" >$@ + link $@ $(PKG)/test-conffile-link1 + +$(PKG)/test-file-link0: + echo "test hard linked file" >$@ + link $@ $(PKG)/test-file-link1 + +$(PKG)/test-fifo-link0: + mkfifo $@ + link $@ $(PKG)/test-fifo-link1 + +$(PKG)/test-null-link0: + $(BEROOT) mknod $@ c 1 3 + $(BEROOT) link $@ $(PKG)/test-null-link1 + +$(PKG)/test-ram0-link0: + $(BEROOT) mknod $@ b 1 0 + $(BEROOT) link $@ $(PKG)/test-ram0-link1 + +TEST_LINKS := \ + $(PKG)/test-conffile-link0 \ + $(PKG)/test-file-link0 \ + $(PKG)/test-fifo-link0 \ + # EOL + +ifdef DPKG_AS_ROOT +TEST_LINKS += \ + $(PKG)/test-null-link0 \ + $(PKG)/test-ram0-link0 \ + # EOL +endif + +build-hook: $(TEST_LINKS) + +clean-hook: + rm -f $(PKG)/test-conffile-link0 $(PKG)/test-conffile-link1 + rm -f $(PKG)/test-file-link0 $(PKG)/test-file-link1 + rm -f $(PKG)/test-fifo-link0 $(PKG)/test-fifo-link1 + rm -f $(PKG)/test-null-link0 $(PKG)/test-null-link1 + rm -f $(PKG)/test-ram0-link0 $(PKG)/test-ram0-link1 + +test-case: + # test unpacking hardlinks + $(DPKG_INSTALL) pkg-hardlink.deb + $(call pkg_is_installed,pkg-hardlink) + +test-clean: + $(DPKG_PURGE) pkg-hardlink + |