diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:58:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:58:51 +0000 |
commit | cbffab246997fb5a06211dfb706b54e5ae5bb59f (patch) | |
tree | 0573c5d96f58d74d76a49c0f2a70398e389a36d3 /tests/t-depends | |
parent | Initial commit. (diff) | |
download | dpkg-upstream.tar.xz dpkg-upstream.zip |
Adding upstream version 1.21.22.upstream/1.21.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-depends')
-rw-r--r-- | tests/t-depends/Makefile | 83 | ||||
-rw-r--r-- | tests/t-depends/pkg-depends-eq/DEBIAN/control | 8 | ||||
-rw-r--r-- | tests/t-depends/pkg-depends-ge/DEBIAN/control | 8 | ||||
-rw-r--r-- | tests/t-depends/pkg-depends-gt/DEBIAN/control | 8 | ||||
-rw-r--r-- | tests/t-depends/pkg-depends-le/DEBIAN/control | 8 | ||||
-rw-r--r-- | tests/t-depends/pkg-depends-lt/DEBIAN/control | 8 | ||||
-rw-r--r-- | tests/t-depends/pkg-depends/DEBIAN/control | 8 | ||||
-rw-r--r-- | tests/t-depends/pkg-real/DEBIAN/control | 7 | ||||
-rw-r--r-- | tests/t-depends/pkg-version-1/DEBIAN/control | 7 | ||||
-rw-r--r-- | tests/t-depends/pkg-version-2/DEBIAN/control | 7 | ||||
-rw-r--r-- | tests/t-depends/pkg-version-3/DEBIAN/control | 7 |
11 files changed, 159 insertions, 0 deletions
diff --git a/tests/t-depends/Makefile b/tests/t-depends/Makefile new file mode 100644 index 0000000..73c10ea --- /dev/null +++ b/tests/t-depends/Makefile @@ -0,0 +1,83 @@ +TESTS_DEB := \ + pkg-real pkg-depends \ + pkg-version-1 pkg-version-2 pkg-version-3 pkg-depends-eq \ + pkg-depends-lt pkg-depends-le pkg-depends-ge pkg-depends-gt + +include ../Test.mk + +test-depends: + # The dependency is not present, fail + ! $(DPKG_INSTALL) pkg-depends.deb + # Install the real package + $(DPKG_INSTALL) pkg-real.deb + # The dependency is present, pass + $(DPKG_INSTALL) pkg-depends.deb + # The dependency is removed, fail + ! $(DPKG_PURGE) pkg-real + # The depending package is removed, pass + $(DPKG_PURGE) pkg-depends + # The dependency is removed, pass + $(DPKG_PURGE) pkg-real + # Now try with --force-depends + $(DPKG_INSTALL) --force-depends pkg-depends.deb + $(DPKG_PURGE) pkg-depends + +define PURGE_DEPENDS +$(DPKG_PURGE) pkg-depends-lt +$(DPKG_PURGE) pkg-depends-le +$(DPKG_PURGE) pkg-depends-eq +$(DPKG_PURGE) pkg-depends-ge +$(DPKG_PURGE) pkg-depends-gt +endef + +test-depends-versioned: + $(PURGE_DEPENDS) + + # The dependency is not present, fail + ! $(DPKG_INSTALL) pkg-depends-lt.deb + ! $(DPKG_INSTALL) pkg-depends-le.deb + ! $(DPKG_INSTALL) pkg-depends-eq.deb + ! $(DPKG_INSTALL) pkg-depends-ge.deb + ! $(DPKG_INSTALL) pkg-depends-gt.deb + + # Install the package v1 + $(DPKG_INSTALL) pkg-version-1.deb + $(DPKG_INSTALL) pkg-depends-lt.deb + $(DPKG_INSTALL) pkg-depends-le.deb + ! $(DPKG_INSTALL) pkg-depends-eq.deb + ! $(DPKG_INSTALL) pkg-depends-ge.deb + ! $(DPKG_INSTALL) pkg-depends-gt.deb + + $(PURGE_DEPENDS) + + # Install the package v2 + $(DPKG_INSTALL) pkg-version-2.deb + ! $(DPKG_INSTALL) pkg-depends-lt.deb + $(DPKG_INSTALL) pkg-depends-le.deb + $(DPKG_INSTALL) pkg-depends-eq.deb + $(DPKG_INSTALL) pkg-depends-ge.deb + ! $(DPKG_INSTALL) pkg-depends-gt.deb + + $(PURGE_DEPENDS) + + # Install the package v3 + $(DPKG_INSTALL) pkg-version-3.deb + ! $(DPKG_INSTALL) pkg-depends-lt.deb + ! $(DPKG_INSTALL) pkg-depends-le.deb + ! $(DPKG_INSTALL) pkg-depends-eq.deb + $(DPKG_INSTALL) pkg-depends-ge.deb + $(DPKG_INSTALL) pkg-depends-gt.deb + + $(PURGE_DEPENDS) + +test-case: test-depends test-depends-versioned + +test-clean: + -$(DPKG_PURGE) pkg-depends + -$(DPKG_PURGE) pkg-real + -$(DPKG_PURGE) pkg-depends-lt + -$(DPKG_PURGE) pkg-depends-le + -$(DPKG_PURGE) pkg-depends-eq + -$(DPKG_PURGE) pkg-depends-ge + -$(DPKG_PURGE) pkg-depends-gt + -$(DPKG_PURGE) pkg-version diff --git a/tests/t-depends/pkg-depends-eq/DEBIAN/control b/tests/t-depends/pkg-depends-eq/DEBIAN/control new file mode 100644 index 0000000..87e1603 --- /dev/null +++ b/tests/t-depends/pkg-depends-eq/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-depends-eq +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Depends: pkg-version (= 2) +Description: test package - package depending on an exact version diff --git a/tests/t-depends/pkg-depends-ge/DEBIAN/control b/tests/t-depends/pkg-depends-ge/DEBIAN/control new file mode 100644 index 0000000..7ba7567 --- /dev/null +++ b/tests/t-depends/pkg-depends-ge/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-depends-ge +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Depends: pkg-version (>= 2) +Description: test package - package depending on a greater or equal version diff --git a/tests/t-depends/pkg-depends-gt/DEBIAN/control b/tests/t-depends/pkg-depends-gt/DEBIAN/control new file mode 100644 index 0000000..41cb041 --- /dev/null +++ b/tests/t-depends/pkg-depends-gt/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-depends-gt +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Depends: pkg-version (>> 2) +Description: test package - package depending on a greater than version diff --git a/tests/t-depends/pkg-depends-le/DEBIAN/control b/tests/t-depends/pkg-depends-le/DEBIAN/control new file mode 100644 index 0000000..b620960 --- /dev/null +++ b/tests/t-depends/pkg-depends-le/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-depends-le +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Depends: pkg-version (<= 2) +Description: test package - package depending on an earlier or equal version diff --git a/tests/t-depends/pkg-depends-lt/DEBIAN/control b/tests/t-depends/pkg-depends-lt/DEBIAN/control new file mode 100644 index 0000000..ffbb9ba --- /dev/null +++ b/tests/t-depends/pkg-depends-lt/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-depends-lt +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Depends: pkg-version (<< 2) +Description: test package - package depending on an earlier than version diff --git a/tests/t-depends/pkg-depends/DEBIAN/control b/tests/t-depends/pkg-depends/DEBIAN/control new file mode 100644 index 0000000..eeefbe4 --- /dev/null +++ b/tests/t-depends/pkg-depends/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-depends +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Depends: pkg-real +Description: test package - package depending on a real package diff --git a/tests/t-depends/pkg-real/DEBIAN/control b/tests/t-depends/pkg-real/DEBIAN/control new file mode 100644 index 0000000..bbd53c2 --- /dev/null +++ b/tests/t-depends/pkg-real/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-real +Version: 0 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Description: test package - real package to depend on diff --git a/tests/t-depends/pkg-version-1/DEBIAN/control b/tests/t-depends/pkg-version-1/DEBIAN/control new file mode 100644 index 0000000..3ec97d1 --- /dev/null +++ b/tests/t-depends/pkg-version-1/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-version +Version: 1 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Description: test package - real package to depend on a specific version diff --git a/tests/t-depends/pkg-version-2/DEBIAN/control b/tests/t-depends/pkg-version-2/DEBIAN/control new file mode 100644 index 0000000..1aff119 --- /dev/null +++ b/tests/t-depends/pkg-version-2/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-version +Version: 2 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Description: test package - real package to depend on a specific version diff --git a/tests/t-depends/pkg-version-3/DEBIAN/control b/tests/t-depends/pkg-version-3/DEBIAN/control new file mode 100644 index 0000000..322945a --- /dev/null +++ b/tests/t-depends/pkg-version-3/DEBIAN/control @@ -0,0 +1,7 @@ +Package: pkg-version +Version: 3 +Section: test +Priority: extra +Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org> +Architecture: all +Description: test package - real package to depend on a specific version |