forked from josch/mmdebstrap
rename include-libmagic-mgc-arm64 tests and allow running them on both amd64 and arm64
This commit is contained in:
parent
4d72f617d9
commit
134fc15634
3 changed files with 60 additions and 14 deletions
|
@ -194,18 +194,18 @@ Skip-If:
|
||||||
hostarch != "amd64"
|
hostarch != "amd64"
|
||||||
not run_ma_same_tests
|
not run_ma_same_tests
|
||||||
|
|
||||||
Test: include-libmagic-mgc-arm64
|
Test: include-foreign-libmagic-mgc
|
||||||
Needs-Root: true
|
Needs-Root: true
|
||||||
Needs-APT-Config: true
|
Needs-APT-Config: true
|
||||||
Skip-If:
|
Skip-If:
|
||||||
hostarch != "amd64"
|
hostarch not in ["amd64", "arm64"]
|
||||||
not run_ma_same_tests
|
not run_ma_same_tests
|
||||||
|
|
||||||
Test: include-libmagic-mgc-arm64-with-multiple-arch-options
|
Test: include-foreign-libmagic-mgc-with-multiple-arch-options
|
||||||
Needs-Root: true
|
Needs-Root: true
|
||||||
Needs-APT-Config: true
|
Needs-APT-Config: true
|
||||||
Skip-If:
|
Skip-If:
|
||||||
hostarch != "amd64"
|
hostarch not in ["amd64", "arm64"]
|
||||||
not run_ma_same_tests
|
not run_ma_same_tests
|
||||||
|
|
||||||
Test: aptopt
|
Test: aptopt
|
||||||
|
|
|
@ -6,20 +6,39 @@
|
||||||
# - installs only few files
|
# - installs only few files
|
||||||
# - doesn't change its name regularly (like gcc-*-base)
|
# - doesn't change its name regularly (like gcc-*-base)
|
||||||
|
|
||||||
|
case "$(dpkg --print-architecture)" in
|
||||||
|
arm64)
|
||||||
|
native_arch=arm64
|
||||||
|
foreign_arch=amd64
|
||||||
|
;;
|
||||||
|
amd64)
|
||||||
|
native_arch=amd64
|
||||||
|
foreign_arch=arm64
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "unsupported native architecture" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
{{ CMD }} --mode=root --variant=apt --architectures=amd64,arm64 --include=libmagic-mgc:arm64 {{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
{{ CMD }} --mode=root --variant=apt \
|
||||||
{ echo "amd64"; echo "arm64"; } | cmp /tmp/debian-chroot/var/lib/dpkg/arch -
|
--architectures="$native_arch,$foreign_arch" \
|
||||||
rm /tmp/debian-chroot/var/lib/apt/extended_states
|
--include="libmagic-mgc:$foreign_arch" \
|
||||||
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.list
|
{{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
||||||
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.md5sums
|
{ echo "$native_arch"; echo "$foreign_arch"; } | cmp /tmp/debian-chroot/var/lib/dpkg/arch -
|
||||||
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
||||||
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/"changelog.Debian.$foreign_arch.gz"
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
||||||
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
||||||
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
||||||
|
rm /tmp/debian-chroot/var/lib/apt/extended_states
|
||||||
|
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.list
|
||||||
|
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.md5sums
|
||||||
rmdir /tmp/debian-chroot/usr/share/doc/libmagic-mgc/
|
rmdir /tmp/debian-chroot/usr/share/doc/libmagic-mgc/
|
||||||
rmdir /tmp/debian-chroot/usr/share/file/magic/
|
rmdir /tmp/debian-chroot/usr/share/file/magic/
|
||||||
rmdir /tmp/debian-chroot/usr/share/file/
|
rmdir /tmp/debian-chroot/usr/share/file/
|
|
@ -1,18 +1,45 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# to test foreign architecture package installation we choose a package which
|
||||||
|
# - is not part of the native installation set
|
||||||
|
# - does not have any dependencies
|
||||||
|
# - installs only few files
|
||||||
|
# - doesn't change its name regularly (like gcc-*-base)
|
||||||
|
|
||||||
|
case "$(dpkg --print-architecture)" in
|
||||||
|
arm64)
|
||||||
|
native_arch=arm64
|
||||||
|
foreign_arch=amd64
|
||||||
|
;;
|
||||||
|
amd64)
|
||||||
|
native_arch=amd64
|
||||||
|
foreign_arch=arm64
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "unsupported native architecture" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
{{ CMD }} --mode=root --variant=apt --architectures=amd64 --architectures=arm64 --include=libmagic-mgc:arm64 {{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
{{ CMD }} --mode=root --variant=apt \
|
||||||
{ echo "amd64"; echo "arm64"; } | cmp /tmp/debian-chroot/var/lib/dpkg/arch -
|
--architectures="$native_arch" \
|
||||||
rm /tmp/debian-chroot/var/lib/apt/extended_states
|
--architectures="$foreign_arch" \
|
||||||
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.list
|
--include="libmagic-mgc:$foreign_arch" \
|
||||||
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.md5sums
|
{{ DIST }} /tmp/debian-chroot {{ MIRROR }}
|
||||||
|
{ echo "$native_arch"; echo "$foreign_arch"; } | cmp /tmp/debian-chroot/var/lib/dpkg/arch -
|
||||||
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
rm /tmp/debian-chroot/usr/lib/file/magic.mgc
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/README.Debian
|
||||||
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/"changelog.Debian.$foreign_arch.gz"
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.Debian.gz
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/changelog.gz
|
||||||
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
rm /tmp/debian-chroot/usr/share/doc/libmagic-mgc/copyright
|
||||||
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
rm /tmp/debian-chroot/usr/share/file/magic.mgc
|
||||||
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
rm /tmp/debian-chroot/usr/share/misc/magic.mgc
|
||||||
|
rm /tmp/debian-chroot/var/lib/apt/extended_states
|
||||||
|
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.list
|
||||||
|
rm /tmp/debian-chroot/var/lib/dpkg/info/libmagic-mgc.md5sums
|
||||||
rmdir /tmp/debian-chroot/usr/share/doc/libmagic-mgc/
|
rmdir /tmp/debian-chroot/usr/share/doc/libmagic-mgc/
|
||||||
rmdir /tmp/debian-chroot/usr/share/file/magic/
|
rmdir /tmp/debian-chroot/usr/share/file/magic/
|
||||||
rmdir /tmp/debian-chroot/usr/share/file/
|
rmdir /tmp/debian-chroot/usr/share/file/
|
Loading…
Reference in a new issue