This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=9d4ff697d19e98f4acf5277902e7717bd8f70bbc

commit 9d4ff697d19e98f4acf5277902e7717bd8f70bbc
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Mon Sep 27 02:24:32 2021 +0200

    test: Generate symlink during test build time
    
    We should not store symlinks in git, as these will not end up in the
    distribution tarball, given that automake passes «-h» to tar to
    dereference symlinks during packing.
---
 tests/t-unpack-symlink/.gitignore               |  1 +
 tests/t-unpack-symlink/Makefile                 | 10 +++++++++-
 tests/t-unpack-symlink/pkg-symlink/test-symlink |  1 -
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/t-unpack-symlink/.gitignore 
b/tests/t-unpack-symlink/.gitignore
new file mode 100644
index 000000000..270d721ca
--- /dev/null
+++ b/tests/t-unpack-symlink/.gitignore
@@ -0,0 +1 @@
+pkg-symlink/test-symlink
diff --git a/tests/t-unpack-symlink/Makefile b/tests/t-unpack-symlink/Makefile
index 09287f4f1..518ca4e30 100644
--- a/tests/t-unpack-symlink/Makefile
+++ b/tests/t-unpack-symlink/Makefile
@@ -2,11 +2,19 @@ TESTS_DEB := pkg-symlink
 
 include ../Test.mk
 
+build-hook:
+       ln -fs test-file pkg-symlink/test-symlink
+
+clean-hook:
+       $(RM) pkg-symlink/test-symlink
+
 test-case:
        # test unpacking symlinks
        $(DPKG_INSTALL) pkg-symlink.deb
        $(call pkg_is_installed,pkg-symlink)
+       test -f "$(DPKG_INSTDIR)/test-file"
+       test -L "$(DPKG_INSTDIR)/test-symlink"
+       test "`readlink '$(DPKG_INSTDIR)/test-symlink'`" = "test-file"
 
 test-clean:
        $(DPKG_PURGE) pkg-symlink
-
diff --git a/tests/t-unpack-symlink/pkg-symlink/test-symlink 
b/tests/t-unpack-symlink/pkg-symlink/test-symlink
deleted file mode 120000
index d30ea1846..000000000
--- a/tests/t-unpack-symlink/pkg-symlink/test-symlink
+++ /dev/null
@@ -1 +0,0 @@
-test-file
\ No newline at end of file

-- 
Dpkg.Org's dpkg

Reply via email to