diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2022-07-27 02:02:58 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2023-04-13 22:13:50 +0200 |
commit | 80a65c5144fa92b82af4da74aea5b5bb7115ac61 (patch) | |
tree | 44aae7c1f33a4b313a287e7da76bac1bce8639a6 /t | |
parent | acee538d3fb370ebfb63ac0a1348ce5a44d692d7 (diff) | |
download | urpmi-80a65c5144fa92b82af4da74aea5b5bb7115ac61.tar urpmi-80a65c5144fa92b82af4da74aea5b5bb7115ac61.tar.gz urpmi-80a65c5144fa92b82af4da74aea5b5bb7115ac61.tar.bz2 urpmi-80a65c5144fa92b82af4da74aea5b5bb7115ac61.tar.xz urpmi-80a65c5144fa92b82af4da74aea5b5bb7115ac61.zip |
Add kernel testsuite for new style kernels
Kernel naming as used in mga9+: each kernel is named "kernel".
So we can have multiple packages named "kernel" installed at the same
time, with different versions
It now works with previous commit.
Diffstat (limited to 't')
-rw-r--r-- | t/data/SPECS/kernel-2/kernel-desktop1.spec | 20 | ||||
-rw-r--r-- | t/data/SPECS/kernel-2/kernel-desktop2.spec | 20 | ||||
-rw-r--r-- | t/data/SPECS/kernel-2/kernel-desktop3.spec | 20 | ||||
-rw-r--r-- | t/data/SPECS/kernel-2/kernel-desktop4.spec | 20 | ||||
-rw-r--r-- | t/data/SPECS/kernel-2/kernel-desktop5.spec | 20 | ||||
-rw-r--r-- | t/superuser--orphans-kernels.t | 7 |
6 files changed, 105 insertions, 2 deletions
diff --git a/t/data/SPECS/kernel-2/kernel-desktop1.spec b/t/data/SPECS/kernel-2/kernel-desktop1.spec new file mode 100644 index 00000000..ca218706 --- /dev/null +++ b/t/data/SPECS/kernel-2/kernel-desktop1.spec @@ -0,0 +1,20 @@ +Summary: x +Name: kernel-desktop +Version: 5.15.41 +Release: 1 +License: x + +%package -n kernel-desktop-latest +Summary: x +Requires: kernel-desktop = %{version}-%{release} + +%description +Kernel naming as used in mga9+. +Each kernel is named "kernel". +So we can have multiple packages named "kernel" installed at the same time, with different versions + +%description -n kernel-desktop-latest +x + +%files +%files -n kernel-desktop-latest diff --git a/t/data/SPECS/kernel-2/kernel-desktop2.spec b/t/data/SPECS/kernel-2/kernel-desktop2.spec new file mode 100644 index 00000000..f42de4d0 --- /dev/null +++ b/t/data/SPECS/kernel-2/kernel-desktop2.spec @@ -0,0 +1,20 @@ +Summary: x +Name: kernel-desktop +Version: 5.15.42 +Release: 1 +License: x + +%package -n kernel-desktop-latest +Summary: x +Requires: kernel-desktop = %{version}-%{release} + +%description +Kernel naming as used in mga9+. +Each kernel is named "kernel". +So we can have multiple packages named "kernel" installed at the same time, with different versions + +%description -n kernel-desktop-latest +x + +%files +%files -n kernel-desktop-latest diff --git a/t/data/SPECS/kernel-2/kernel-desktop3.spec b/t/data/SPECS/kernel-2/kernel-desktop3.spec new file mode 100644 index 00000000..ff40fec8 --- /dev/null +++ b/t/data/SPECS/kernel-2/kernel-desktop3.spec @@ -0,0 +1,20 @@ +Summary: x +Name: kernel-desktop +Version: 5.15.43 +Release: 1 +License: x + +%package -n kernel-desktop-latest +Summary: x +Requires: kernel-desktop = %{version}-%{release} + +%description +Kernel naming as used in mga9+. +Each kernel is named "kernel". +So we can have multiple packages named "kernel" installed at the same time, with different versions + +%description -n kernel-desktop-latest +x + +%files +%files -n kernel-desktop-latest diff --git a/t/data/SPECS/kernel-2/kernel-desktop4.spec b/t/data/SPECS/kernel-2/kernel-desktop4.spec new file mode 100644 index 00000000..edbd9745 --- /dev/null +++ b/t/data/SPECS/kernel-2/kernel-desktop4.spec @@ -0,0 +1,20 @@ +Summary: x +Name: kernel-desktop +Version: 5.15.44 +Release: 1 +License: x + +%package -n kernel-desktop-latest +Summary: x +Requires: kernel-desktop = %{version}-%{release} + +%description +Kernel naming as used in mga9+. +Each kernel is named "kernel". +So we can have multiple packages named "kernel" installed at the same time, with different versions + +%description -n kernel-desktop-latest +x + +%files +%files -n kernel-desktop-latest diff --git a/t/data/SPECS/kernel-2/kernel-desktop5.spec b/t/data/SPECS/kernel-2/kernel-desktop5.spec new file mode 100644 index 00000000..e22152a9 --- /dev/null +++ b/t/data/SPECS/kernel-2/kernel-desktop5.spec @@ -0,0 +1,20 @@ +Summary: x +Name: kernel-desktop +Version: 5.15.45 +Release: 1 +License: x + +%package -n kernel-desktop-latest +Summary: x +Requires: kernel-desktop = %{version}-%{release} + +%description +Kernel naming as used in mga9+. +Each kernel is named "kernel". +So we can have multiple packages named "kernel" installed at the same time, with different versions + +%description -n kernel-desktop-latest +x + +%files +%files -n kernel-desktop-latest diff --git a/t/superuser--orphans-kernels.t b/t/superuser--orphans-kernels.t index 2b6e00dd..f101f1f5 100644 --- a/t/superuser--orphans-kernels.t +++ b/t/superuser--orphans-kernels.t @@ -19,14 +19,17 @@ set_urpmi_cfg_global_options({ 'nb-of-new-unrequested-pkgs-between-auto-select-o # old naming, each kernel NVR is N=kernel-desktop-5.6.2-1, V=1 R=1.mga8 test_unorphan_kernels("$name-1", 'kernel-desktop-latest'); +# new naming, each kernel NVR is N=kernel-desktop, V=5.6.2 R=1.mga8 +test_unorphan_kernels("$name-2", 'kernel-desktop-latest', 'kernel-desktop'); sub test_unorphan_kernels { - my ($medium, $pkg) = @_; + my ($medium, $pkg, $o_pkg2) = @_; my $base_kversion = '5.15.4'; + $o_pkg2 ||= "kernel-desktop-${base_kversion}5-1.mga8"; print "# test_unorphan_kernels($pkg) ($base_kversion)\n"; urpmi("--media $medium --auto $pkg-${base_kversion}$_-1") foreach 1..4; urpmi("--media $medium --auto $pkg"); urpme("--auto --auto-orphans"); - check_installed_and_remove($pkg, "kernel-desktop-${base_kversion}5-1.mga8"); + check_installed_and_remove($pkg, $o_pkg2); } |