summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/files/multi-arch
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/files/multi-arch')
-rw-r--r--t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/control.in18
-rwxr-xr-xt/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/rules18
-rw-r--r--t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/fill-values4
-rw-r--r--t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/desc3
-rw-r--r--t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/hints3
-rw-r--r--t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/post-test1
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/control.in29
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-all.install1
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-any.install1
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/rules13
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/fill-values3
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/Makefile21
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in6
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in6
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in9
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in6
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in7
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in6
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-good.pc6
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-really-bad.pc38
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/eval/desc3
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/eval/hints3
-rw-r--r--t/recipes/checks/files/multi-arch/files-pkgconfig/eval/post-test2
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/control.in33
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install1
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.install1
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols3
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/fill-values5
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/Makefile24
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/code.c15
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/desc2
-rw-r--r--t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/hints1
33 files changed, 293 insertions, 0 deletions
diff --git a/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/control.in b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/control.in
new file mode 100644
index 0000000..f0ba081
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/control.in
@@ -0,0 +1,18 @@
+Source: [% $source %]
+Priority: optional
+Section: [% $section %]
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libfoo-dev
+Section: libdevel
+Architecture: [% $package_architecture %]
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Multi-Arch: foreign
+Description: [% $description %] (dev)
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
diff --git a/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/rules b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/rules
new file mode 100755
index 0000000..ba49d56
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/debian/rules
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+
+DESTDIR = debian/$(shell dh_listpackages)/usr/lib/$(DEB_HOST_MULTIARCH)
+
+%:
+ dh $@
+
+override_dh_auto_install:
+ dh_auto_install
+
+ mkdir -p $(DESTDIR)/cmake
+ mkdir -p $(DESTDIR)/pkgconfig
+
+ touch $(DESTDIR)/libfoo.a
+ touch $(DESTDIR)/cmake/foo.cmake
+ touch $(DESTDIR)/pkgconfig/libfoo.pc
+
+override_dh_strip:
diff --git a/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/fill-values b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/fill-values
new file mode 100644
index 0000000..c391850
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/build-spec/fill-values
@@ -0,0 +1,4 @@
+Skeleton: upload-native
+Testname: files-multiarch-foreign-files
+Description: Test for files violating Multi-Arch: foreign
+Package-Architecture: any
diff --git a/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/desc b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/desc
new file mode 100644
index 0000000..30118b5
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/desc
@@ -0,0 +1,3 @@
+Testname: files-multiarch-foreign-files
+Check: files/multi-arch
+Test-Architectures: amd64
diff --git a/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/hints b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/hints
new file mode 100644
index 0000000..120cded
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/hints
@@ -0,0 +1,3 @@
+libfoo-dev (binary): multiarch-foreign-static-library [usr/lib/x86_64-linux-gnu/libfoo.a]
+libfoo-dev (binary): multiarch-foreign-pkgconfig [usr/lib/x86_64-linux-gnu/pkgconfig/libfoo.pc]
+libfoo-dev (binary): multiarch-foreign-cmake-file [usr/lib/x86_64-linux-gnu/cmake/foo.cmake]
diff --git a/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/post-test b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/post-test
new file mode 100644
index 0000000..7e8f67e
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-multiarch-foreign-files/eval/post-test
@@ -0,0 +1 @@
+s, usr/lib/[^/]+/, usr/lib/TRIPLET/,
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/control.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/control.in
new file mode 100644
index 0000000..77950ef
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/control.in
@@ -0,0 +1,29 @@
+Source: [% $source %]
+Priority: optional
+Section: devel
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: pkgconfig-all
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlib:Depends}
+Description: Contains test file for pkgconfig arch all
+ This is a test package designed to exercise some feature or tag of
+ Lintian for arch all pkgconfig files.
+ It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+
+Package: pkgconfig-any
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends}, ${shlib:Depends}
+Description: Contains test file for pkgconfig arch any
+ This is a test package designed to exercise some feature or tag of
+ Lintian for arch any pkgconfig files.
+ It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-all.install b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-all.install
new file mode 100644
index 0000000..6127277
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-all.install
@@ -0,0 +1 @@
+usr/lib/pkgconfig/*.pc
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-any.install b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-any.install
new file mode 100644
index 0000000..550fc5b
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/pkgconfig-any.install
@@ -0,0 +1 @@
+usr/lib/*-*-*/pkgconfig/*.pc
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/rules b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/rules
new file mode 100644
index 0000000..81bade2
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+DESTDIR = debian/pkgconfig-any/usr/lib
+
+%:
+ dh $@
+
+override_dh_install:
+ dh_install
+ mkdir -p $(DESTDIR)
+ touch $(DESTDIR)/libstaticlib.a
+
+override_dh_strip:
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/fill-values b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/fill-values
new file mode 100644
index 0000000..9a97d95
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: files-pkgconfig
+Description: Check for detection of pkgconfig problem
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/Makefile b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/Makefile
new file mode 100644
index 0000000..796e1bc
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/Makefile
@@ -0,0 +1,21 @@
+ARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+ifeq ($(ARCH), x86_64-linux-gnu)
+ ARCH_CROSS=i386-linux-gnu
+else
+ ARCH_CROSS=x86_64-linux-gnu
+endif
+
+all:
+ find generated -name '*.pc.in' -exec sh -c 'echo "build" {} && cat {} | sed s/\$$\(ARCH\)/$(ARCH)/g | sed s/\$$\(ARCH_CROSS\)/$(ARCH_CROSS)/g > `echo {} | sed s/\.pc\.in$$/\.pc/g`' \;
+
+install:
+ install -d $(DESTDIR)/usr/lib/pkgconfig/
+ install -d $(DESTDIR)/usr/lib/$(ARCH)/pkgconfig/
+ install -m 644 indep-*.pc $(DESTDIR)/usr/lib/pkgconfig/
+ install -m 644 generated/arch-*.pc $(DESTDIR)/usr/lib/$(ARCH)/pkgconfig/
+ install -m 644 generated/indep-*.pc $(DESTDIR)/usr/lib/pkgconfig/
+
+clean distclean:
+ rm -f generated/*.pc
+
+check test:
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in
new file mode 100644
index 0000000..452d3a2
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-cross.pc.in
@@ -0,0 +1,6 @@
+Name: arch-cross
+Description: A library that include cross architecture
+Requires:
+Version: 3.1.3
+Libs:
+Cflags: -I/usr/include/$(ARCH_CROSS)/someconfig.h
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in
new file mode 100644
index 0000000..7c3bd9e
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-good.pc.in
@@ -0,0 +1,6 @@
+Name: indep-good
+Description: A library good
+Requires:
+Version: 3.1.3
+Libs:
+Cflags: -I/usr/include/indep-good
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in
new file mode 100644
index 0000000..c847fe3
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/arch-include-arch.pc.in
@@ -0,0 +1,9 @@
+Name: arch-include-arch
+Description: A library that include some arch dir
+Requires:
+Version: 3.1.3
+Libs: -ldoesnotexist -lotherdoesnotexist -Lfalse-positive-linux-gnu -lstaticlib
+Cflags: -I/usr/include/$(ARCH)/arch-include-arch
+libdir=/usr/lib/$(ARCH)
+# no new line
+Libs: -L/usr/lib/$(ARCH)
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in
new file mode 100644
index 0000000..3325139
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-1.pc.in
@@ -0,0 +1,6 @@
+Name: indep-include-arch-1
+Description: A library that include some arch dir
+Requires:
+Version: 3.1.3
+Libs:
+Cflags: -I/usr/include/$(ARCH)/indep-include-arch
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in
new file mode 100644
index 0000000..36dd09b
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-2.pc.in
@@ -0,0 +1,7 @@
+Name: indep-include-arch-2
+Description: A library that include some arch dir
+Requires:
+Version: 3.1.3
+Libs:
+# no new line at end
+Cflags: -I/usr/include/$(ARCH) \ No newline at end of file
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in
new file mode 100644
index 0000000..2a73e27
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/generated/indep-include-arch-3.pc.in
@@ -0,0 +1,6 @@
+Name: indep-include-arch-2
+Description: A library that include some arch dir
+Requires:
+Version: 3.1.3
+Libs:
+Cflags: -I/usr/include/$(ARCH) -I/usr/include
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-good.pc b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-good.pc
new file mode 100644
index 0000000..7c3bd9e
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-good.pc
@@ -0,0 +1,6 @@
+Name: indep-good
+Description: A library good
+Requires:
+Version: 3.1.3
+Libs:
+Cflags: -I/usr/include/indep-good
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-really-bad.pc b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-really-bad.pc
new file mode 100644
index 0000000..98b3fa3
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/build-spec/orig/indep-really-bad.pc
@@ -0,0 +1,38 @@
+Name: indep-good
+Description: A library with ugly flags
+Requires:
+Version: 3.1.3
+Libs:
+# a comment removed -L/usr/local/lib/somewhere \
+SOMEFLAGS=-I/var/cache/pbuilder/build/
+Cflags: \
+ -I/usr/local/somewhere \
+ -D__linux__ \
+ -D__x86_64__ \
+ -D__OSVERSION__=2\
+ -g \
+ -D_FORTIFY_SOURCE=2 \
+ -O2 \
+ -Wall \
+ -fvisibility=hidden \
+ -fPIE \
+ -fstack-protector \
+ --param=ssp-buffer-size=2 \
+ -frounding-math \
+ -lmath \
+ -march=core2 \
+ -DNDEBUG \
+ -pedantic \
+ -DNEW_STDCPP \
+ -fno-check-new \
+ -fno-inline \
+ -Wl,z,relro \
+ -pie \
+ -fno-strict-aliasing -fwrapv -fexcess-precision=standard \
+ -ffast-math -funsafe-math-optimizations -fsigned-zeros -fno-trapping-math -fassociative-math -freciprocal-math -fsignaling-math -fno-errno-math -ffp-contract -fassociative-math -ffinite-math-only \
+ @SOME_FLAGS@
+#False positive
+Fflags: \
+ @SOME_FLAGS \
+ @
+
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/desc b/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/desc
new file mode 100644
index 0000000..ae00fa5
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/desc
@@ -0,0 +1,3 @@
+Testname: files-pkgconfig
+Check: files/multi-arch
+Test-Architectures: amd64
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/hints b/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/hints
new file mode 100644
index 0000000..34e4c75
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/hints
@@ -0,0 +1,3 @@
+pkgconfig-any (binary): multiarch-foreign-pkgconfig [usr/lib/x86_64-linux-gnu/pkgconfig/arch-include-arch.pc]
+pkgconfig-any (binary): multiarch-foreign-pkgconfig [usr/lib/x86_64-linux-gnu/pkgconfig/arch-good.pc]
+pkgconfig-any (binary): multiarch-foreign-pkgconfig [usr/lib/x86_64-linux-gnu/pkgconfig/arch-cross.pc]
diff --git a/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/post-test b/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/post-test
new file mode 100644
index 0000000..a4059d0
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-pkgconfig/eval/post-test
@@ -0,0 +1,2 @@
+s/full text contains architecture specific dir \S+$/full text contains architecture specific dir ARCH/
+s, usr/lib/[^/]+/pkgconfig/, usr/lib/ARCH/pkgconfig/,
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/compat.in b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/control.in b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/control.in
new file mode 100644
index 0000000..addc2fc
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/control.in
@@ -0,0 +1,33 @@
+Source: [% $source %]
+Priority: optional
+Section: [% $section %]
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: no
+
+Package: libpublic1
+Section: libs
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Multi-Arch: same
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+
+Package: libpublic-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Multi-Arch: foreign
+Description: [% $description %] (dev)
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+ .
+ Supposedly includes some headers.
+
+
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install
new file mode 100644
index 0000000..012244d
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic-dev.install
@@ -0,0 +1 @@
+usr/lib/*/*.so
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.install b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.install
new file mode 100644
index 0000000..3de3b10
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.install
@@ -0,0 +1 @@
+usr/lib/*/*.so.*
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols
new file mode 100644
index 0000000..d8226ca
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/debian/libpublic1.symbols
@@ -0,0 +1,3 @@
+libexecbit.so.1 libexecbit1 #MINVER#
+ e@Base 1.0
+ energy@Base 0.9
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/fill-values b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/fill-values
new file mode 100644
index 0000000..2b7d50c
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/fill-values
@@ -0,0 +1,5 @@
+Skeleton: upload-native
+Testname: files-wrong-ma-foreign
+Description: Test for wrong usage of Multi-Arch foreign
+Default-Build-Depends: debhelper (>= 9.20151004~)
+Dh-Compat-Level: 9
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/Makefile b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/Makefile
new file mode 100644
index 0000000..ff58c3a
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/Makefile
@@ -0,0 +1,24 @@
+CC=gcc
+CFLAGS+= -fPIC
+
+SONAMES:= libpublic.so.1
+LIBFILES:= $(patsubst %,%.0.1, $(SONAMES))
+LIBDIR := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+all: $(LIBFILES)
+
+$(LIBFILES): code.o
+ $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc
+
+clean:
+ rm -f *.a *.o *.so*
+
+install: all
+ install -m 0755 -d $(DESTDIR)$(LIBDIR)
+ install -m 0644 *.so* $(DESTDIR)$(LIBDIR)
+ set -e ; for FILE in $(SONAMES) ; do \
+ ln -s $${FILE}.0.1 $(DESTDIR)$(LIBDIR)/$$FILE ; \
+ ln -s $${FILE}.0.1 $(DESTDIR)$(LIBDIR)/$$(echo $$FILE | perl -pe 's/\.so\K.*//') ; \
+ done
+
+.PHONY: install clean
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/code.c b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/code.c
new file mode 100644
index 0000000..0ed08e0
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/build-spec/orig/code.c
@@ -0,0 +1,15 @@
+#include <stdlib.h>
+#include <math.h>
+
+double e(void (*f)(char *)){
+ char tmp[10];
+ double x;
+ f(tmp);
+ x = atof(tmp);
+ return exp(x);
+}
+
+double energy(double mass){
+ return pow(10.0, 8.0) * pow(3.0, 2.0) * mass;
+}
+
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/desc b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/desc
new file mode 100644
index 0000000..f8a0fb9
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/desc
@@ -0,0 +1,2 @@
+Testname: files-wrong-ma-foreign
+Check: files/multi-arch
diff --git a/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/hints b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/hints
new file mode 100644
index 0000000..ac7ed64
--- /dev/null
+++ b/t/recipes/checks/files/multi-arch/files-wrong-ma-foreign/eval/hints
@@ -0,0 +1 @@
+libpublic-dev (binary): multiarch-foreign-shared-library