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=697ff7fbfe988af8c0fbb2695f009d61f8e34fa1

commit 697ff7fbfe988af8c0fbb2695f009d61f8e34fa1
Author: RaphaĆ«l Hertzog <[email protected]>
AuthorDate: Tue Jan 18 15:13:01 2011 +0000

    t-multiarch: Add basic installation tests of packages with a Multi-Arch 
field
    
    Sponsored-by: Linaro Limited
    
    [[email protected]:
     - Remove duped -i in DPKG_INSTALL call, causing test to fail for
       unrelated reasons.
     - Remove BEROOT from arch add and remove dpkg commands. ]
    
    Signed-off-by: Guillem Jover <[email protected]>
---
 t-multiarch/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/t-multiarch/Makefile b/t-multiarch/Makefile
index 4643d17d8..fff6bd1a6 100644
--- a/t-multiarch/Makefile
+++ b/t-multiarch/Makefile
@@ -67,6 +67,8 @@ build-hook: $(PKG_TO_BUILD)
 
 TEST_CASES += test-print-foreign-architecture
 TEST_CASES += test-build-invalid
+TEST_CASES += test-install-native
+TEST_CASES += test-install-foreign
 
 test-case: $(TEST_CASES)
 
@@ -97,6 +99,44 @@ test-build-invalid:
        ! $(DPKG_BUILD_DEB) pkg-ma-dep-on-allowed-fake_1.0_$(NATIVE_ARCH) 
foo.deb
        rm -f foo.deb
 
+test-install-native:
+       $(DPKG_INSTALL) pkg-ma-same_1.0_$(NATIVE_ARCH).deb
+       $(DPKG_INSTALL) pkg-ma-foreign_1.0_$(NATIVE_ARCH).deb
+       $(DPKG_INSTALL) pkg-ma-allowed_1.0_$(NATIVE_ARCH).deb
+       $(DPKG_INSTALL) pkg-ma-no_1.0_$(NATIVE_ARCH).deb
+       $(call pkg_is_installed,pkg-ma-same:$(NATIVE_ARCH))
+       $(call pkg_is_installed,pkg-ma-foreign)
+       $(call pkg_is_installed,pkg-ma-allowed)
+       $(call pkg_is_installed,pkg-ma-no)
+       $(DPKG_PURGE) pkg-ma-same:$(NATIVE_ARCH) pkg-ma-foreign pkg-ma-allowed 
pkg-ma-no
+       $(call pkg_is_not_installed,pkg-ma-same:$(NATIVE_ARCH))
+       $(call pkg_is_not_installed,pkg-ma-foreign)
+       $(call pkg_is_not_installed,pkg-ma-allowed)
+       $(call pkg_is_not_installed,pkg-ma-no)
+
+test-install-foreign:
+       $(DPKG) --remove-architecture $(FOREIGN_ARCH)
+       # Installation of foreign arch packages must fail by default
+       ! $(DPKG_INSTALL) pkg-ma-same_1.0_$(FOREIGN_ARCH).deb
+       ! $(DPKG_INSTALL) pkg-ma-foreign_1.0_$(FOREIGN_ARCH).deb
+       ! $(DPKG_INSTALL) pkg-ma-allowed_1.0_$(FOREIGN_ARCH).deb
+       ! $(DPKG_INSTALL) pkg-ma-no_1.0_$(FOREIGN_ARCH).deb
+       # Once architecture has been added it should succeed
+       $(DPKG) --add-architecture $(FOREIGN_ARCH)
+       $(DPKG_INSTALL) pkg-ma-same_1.0_$(FOREIGN_ARCH).deb
+       $(DPKG_INSTALL) pkg-ma-foreign_1.0_$(FOREIGN_ARCH).deb
+       $(DPKG_INSTALL) pkg-ma-allowed_1.0_$(FOREIGN_ARCH).deb
+       $(DPKG_INSTALL) pkg-ma-no_1.0_$(FOREIGN_ARCH).deb
+       $(call pkg_is_installed,pkg-ma-same:$(FOREIGN_ARCH))
+       $(call pkg_is_installed,pkg-ma-foreign:$(FOREIGN_ARCH))
+       $(call pkg_is_installed,pkg-ma-allowed:$(FOREIGN_ARCH))
+       $(call pkg_is_installed,pkg-ma-no:$(FOREIGN_ARCH))
+       $(DPKG_PURGE) pkg-ma-same:$(FOREIGN_ARCH) 
pkg-ma-foreign:$(FOREIGN_ARCH) pkg-ma-allowed:$(FOREIGN_ARCH) 
pkg-ma-no:$(FOREIGN_ARCH)
+       $(call pkg_is_not_installed,pkg-ma-same:$(FOREIGN_ARCH))
+       $(call pkg_is_not_installed,pkg-ma-foreign:$(FOREIGN_ARCH))
+       $(call pkg_is_not_installed,pkg-ma-allowed:$(FOREIGN_ARCH))
+       $(call pkg_is_not_installed,pkg-ma-no:$(FOREIGN_ARCH))
+
 test-clean:
        $(DPKG_QUERY) -W | grep ^pkg-ma- | (while read pkg ver; do \
            $(DPKG_PURGE) $$pkg; \

-- 
Dpkg.Org's dpkg

Reply via email to