diff options
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | MANIFEST | 3 | ||||
-rw-r--r-- | t/data/SPECS/i586-to-i686/libfoobar.spec | 26 | ||||
-rw-r--r-- | t/data/rpm-i586-to-i686/libfoobar-1-1.i586.rpm | bin | 0 -> 8880 bytes | |||
-rw-r--r-- | t/data/rpm-i586-to-i686/libfoobar-1-1.i686.rpm | bin | 0 -> 8936 bytes | |||
-rw-r--r-- | t/superuser--i586-to-i686.t | 22 |
6 files changed, 53 insertions, 0 deletions
@@ -1,4 +1,6 @@ - Set wget as default downloader (mga#24362) +- testsuite: + o add i586 to i686 upgrate test Version 8.131 - 13 April 2023 @@ -109,6 +109,8 @@ t/data/reconfig.urpmi t/data/rpm-buggy/invalid-signature.rpm t/data/rpm-buggy/not-a-rpm.rpm t/data/rpm-buggy/weird-header.rpm +t/data/rpm-i586-to-i686/libfoobar-1-1.i586.rpm +t/data/rpm-i586-to-i686/libfoobar-1-1.i686.rpm t/data/rpm-v3/KBackup-1.2.11-1.src.rpm t/data/rpm-v3/libtermcap-2.0.8-2.i386.rpm t/data/rpm-v3/nls-1.0-2.i386.rpm @@ -196,6 +198,7 @@ t/data/SPECS/handle-conflict-deps2/c-2.spec t/data/SPECS/handle-conflict-deps2/d1-1.spec t/data/SPECS/handle-conflict-deps2/d1-2.spec t/data/SPECS/handle-conflict-deps2/d2.spec +t/data/SPECS/i586-to-i686/libfoobar.spec t/data/SPECS/kernel-1/kernel-desktop1.spec t/data/SPECS/kernel-1/kernel-desktop2.spec t/data/SPECS/kernel-1/kernel-desktop3.spec diff --git a/t/data/SPECS/i586-to-i686/libfoobar.spec b/t/data/SPECS/i586-to-i686/libfoobar.spec new file mode 100644 index 00000000..891d2e98 --- /dev/null +++ b/t/data/SPECS/i586-to-i686/libfoobar.spec @@ -0,0 +1,26 @@ +# rpmbuild -ba libfoobar.spec --target i586 +# rpmbuild -ba libfoobar.spec --target i686 + +# we could build with -static but then pkg goes up from 8.5kb to 280Kb: +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}libc.so +Summary: x +Name: libfoobar +Version: 1 +Release: 1 +License: x + +%build +cat > t.c <<EOF +void main () {} +EOF +linux32 gcc -m32 -march=i586 -o t t.c + +%install +mkdir -p %buildroot/%_bindir +cp -a t %buildroot/%_bindir + +%description +binary lib + +%files +%_bindir/t diff --git a/t/data/rpm-i586-to-i686/libfoobar-1-1.i586.rpm b/t/data/rpm-i586-to-i686/libfoobar-1-1.i586.rpm Binary files differnew file mode 100644 index 00000000..ed0d9211 --- /dev/null +++ b/t/data/rpm-i586-to-i686/libfoobar-1-1.i586.rpm diff --git a/t/data/rpm-i586-to-i686/libfoobar-1-1.i686.rpm b/t/data/rpm-i586-to-i686/libfoobar-1-1.i686.rpm Binary files differnew file mode 100644 index 00000000..94055db8 --- /dev/null +++ b/t/data/rpm-i586-to-i686/libfoobar-1-1.i686.rpm diff --git a/t/superuser--i586-to-i686.t b/t/superuser--i586-to-i686.t new file mode 100644 index 00000000..6ff3914e --- /dev/null +++ b/t/superuser--i586-to-i686.t @@ -0,0 +1,22 @@ +#!/usr/bin/perl + +# kernel-desktop-latest request latest kernel-desktop-foobar +# +use strict; +use lib '.', 't'; +use helper; +use urpm::cfg; +use urpm::orphans; +use Test::More 'no_plan'; + +need_root_and_prepare(); + +my $arch = urpm::cfg::get_arch(); +my $name = 'kernel'; +my $medium = 'i586-to-i686'; +urpmi_addmedia("$medium $::pwd/media/rpm-i586-to-i686/"); +urpmi("--media $medium --auto libfoobar-1-1.i586"); +check_installed_names('libfoobar'); +urpmi("--media $medium --auto libfoobar-1-1.i686"); +is(`rpm -q --qf '%{NVRA}' --root $::pwd/root libfoobar`, 'libfoobar-1-1.i686', 'i686 pkgs is installed (aka upgraded)'); +check_installed_and_remove('libfoobar'); |