From 0d80e998b90c8f5cfb9fbc8dc9f7974f6d0e9fe9 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 7 Sep 2007 11:01:05 +0000 Subject: rename test into split-transactions--promote --- MANIFEST | 14 ++++-- t/data/SPECS/split-transactions--promote-1/a.spec | 14 ++++++ t/data/SPECS/split-transactions--promote-1/b.spec | 13 ++++++ t/data/SPECS/split-transactions--promote-1/c.spec | 14 ++++++ t/data/SPECS/split-transactions--promote-1/d1.spec | 14 ++++++ t/data/SPECS/split-transactions--promote-1/d2.spec | 13 ++++++ t/data/SPECS/split-transactions--promote-2/a.spec | 14 ++++++ t/data/SPECS/split-transactions--promote-2/b.spec | 13 ++++++ t/data/SPECS/split-transactions--promote-2/d1.spec | 13 ++++++ t/data/SPECS/split-transactions--promote-2/d2.spec | 14 ++++++ .../split-transactions--strict-require-1/a.spec | 14 ------ .../split-transactions--strict-require-1/b.spec | 13 ------ .../split-transactions--strict-require-1/c.spec | 14 ------ .../split-transactions--strict-require-1/d1.spec | 14 ------ .../split-transactions--strict-require-1/d2.spec | 13 ------ .../split-transactions--strict-require-2/a.spec | 14 ------ .../split-transactions--strict-require-2/b.spec | 13 ------ .../split-transactions--strict-require-2/d1.spec | 13 ------ .../split-transactions--strict-require-2/d2.spec | 14 ------ t/superuser--split-transactions--promote.t | 50 ++++++++++++++++++++++ t/superuser--split-transactions--strict-require.t | 50 ---------------------- 21 files changed, 182 insertions(+), 176 deletions(-) create mode 100644 t/data/SPECS/split-transactions--promote-1/a.spec create mode 100644 t/data/SPECS/split-transactions--promote-1/b.spec create mode 100644 t/data/SPECS/split-transactions--promote-1/c.spec create mode 100644 t/data/SPECS/split-transactions--promote-1/d1.spec create mode 100644 t/data/SPECS/split-transactions--promote-1/d2.spec create mode 100644 t/data/SPECS/split-transactions--promote-2/a.spec create mode 100644 t/data/SPECS/split-transactions--promote-2/b.spec create mode 100644 t/data/SPECS/split-transactions--promote-2/d1.spec create mode 100644 t/data/SPECS/split-transactions--promote-2/d2.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-1/a.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-1/b.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-1/c.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-1/d1.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-1/d2.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-2/a.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-2/b.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-2/d1.spec delete mode 100644 t/data/SPECS/split-transactions--strict-require-2/d2.spec create mode 100644 t/superuser--split-transactions--promote.t delete mode 100644 t/superuser--split-transactions--strict-require.t diff --git a/MANIFEST b/MANIFEST index fb39dd96..5d52fc76 100644 --- a/MANIFEST +++ b/MANIFEST @@ -227,10 +227,15 @@ t/data/SPECS/split-transactions--conflict-1/b.spec t/data/SPECS/split-transactions--conflict-1/c.spec t/data/SPECS/split-transactions--conflict-2/b.spec t/data/SPECS/split-transactions--conflict-2/d.spec -t/data/SPECS/split-transactions--strict-require-1/a.spec -t/data/SPECS/split-transactions--strict-require-1/b.spec -t/data/SPECS/split-transactions--strict-require-2/a.spec -t/data/SPECS/split-transactions--strict-require-2/b.spec +t/data/SPECS/split-transactions--promote-1/a.spec +t/data/SPECS/split-transactions--promote-1/b.spec +t/data/SPECS/split-transactions--promote-1/c.spec +t/data/SPECS/split-transactions--promote-1/d1.spec +t/data/SPECS/split-transactions--promote-1/d2.spec +t/data/SPECS/split-transactions--promote-2/a.spec +t/data/SPECS/split-transactions--promote-2/b.spec +t/data/SPECS/split-transactions--promote-2/d1.spec +t/data/SPECS/split-transactions--promote-2/d2.spec t/data/SPECS/split-transactions--strict-require-and-obsolete-1/a.spec t/data/SPECS/split-transactions--strict-require-and-obsolete-1/bb.spec t/data/SPECS/split-transactions--strict-require-and-obsolete-1/c-1.spec @@ -276,6 +281,7 @@ t/superuser--README-urpmi.t t/superuser--rpmnew.t t/superuser--specify-media.t t/superuser--split-transactions--conflict.t +t/superuser--split-transactions--promote.t t/superuser--split-transactions--strict-require-and-obsolete.t t/superuser--split-transactions.t t/superuser--srpm-bootstrapping.t diff --git a/t/data/SPECS/split-transactions--promote-1/a.spec b/t/data/SPECS/split-transactions--promote-1/a.spec new file mode 100644 index 00000000..b9d1643b --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-1/a.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: b = 1 +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-1/b.spec b/t/data/SPECS/split-transactions--promote-1/b.spec new file mode 100644 index 00000000..337a7807 --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-1/b.spec @@ -0,0 +1,13 @@ +Summary: x +Name: b +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-1/c.spec b/t/data/SPECS/split-transactions--promote-1/c.spec new file mode 100644 index 00000000..3331a997 --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-1/c.spec @@ -0,0 +1,14 @@ +Summary: x +Name: c +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Requires: d +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-1/d1.spec b/t/data/SPECS/split-transactions--promote-1/d1.spec new file mode 100644 index 00000000..315d23e2 --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-1/d1.spec @@ -0,0 +1,14 @@ +Summary: x +Name: d1 +Version: 1 +Release: 1 +License: x +Group: x +Url: x +Provides: d +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-1/d2.spec b/t/data/SPECS/split-transactions--promote-1/d2.spec new file mode 100644 index 00000000..02a66360 --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-1/d2.spec @@ -0,0 +1,13 @@ +Summary: x +Name: d2 +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-2/a.spec b/t/data/SPECS/split-transactions--promote-2/a.spec new file mode 100644 index 00000000..8c506dea --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-2/a.spec @@ -0,0 +1,14 @@ +Summary: x +Name: a +Version: 2 +Release: 1 +License: x +Group: x +Url: x +Requires: b = 2 +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-2/b.spec b/t/data/SPECS/split-transactions--promote-2/b.spec new file mode 100644 index 00000000..61c0beca --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-2/b.spec @@ -0,0 +1,13 @@ +Summary: x +Name: b +Version: 2 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-2/d1.spec b/t/data/SPECS/split-transactions--promote-2/d1.spec new file mode 100644 index 00000000..ff13b4a7 --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-2/d1.spec @@ -0,0 +1,13 @@ +Summary: x +Name: d1 +Version: 2 +Release: 1 +License: x +Group: x +Url: x +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--promote-2/d2.spec b/t/data/SPECS/split-transactions--promote-2/d2.spec new file mode 100644 index 00000000..2e36fa7a --- /dev/null +++ b/t/data/SPECS/split-transactions--promote-2/d2.spec @@ -0,0 +1,14 @@ +Summary: x +Name: d2 +Version: 2 +Release: 1 +License: x +Group: x +Url: x +Provides: d +BuildRoot: %{_tmppath}/%{name} + +%description +x + +%files diff --git a/t/data/SPECS/split-transactions--strict-require-1/a.spec b/t/data/SPECS/split-transactions--strict-require-1/a.spec deleted file mode 100644 index b9d1643b..00000000 --- a/t/data/SPECS/split-transactions--strict-require-1/a.spec +++ /dev/null @@ -1,14 +0,0 @@ -Summary: x -Name: a -Version: 1 -Release: 1 -License: x -Group: x -Url: x -Requires: b = 1 -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-1/b.spec b/t/data/SPECS/split-transactions--strict-require-1/b.spec deleted file mode 100644 index 337a7807..00000000 --- a/t/data/SPECS/split-transactions--strict-require-1/b.spec +++ /dev/null @@ -1,13 +0,0 @@ -Summary: x -Name: b -Version: 1 -Release: 1 -License: x -Group: x -Url: x -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-1/c.spec b/t/data/SPECS/split-transactions--strict-require-1/c.spec deleted file mode 100644 index 3331a997..00000000 --- a/t/data/SPECS/split-transactions--strict-require-1/c.spec +++ /dev/null @@ -1,14 +0,0 @@ -Summary: x -Name: c -Version: 1 -Release: 1 -License: x -Group: x -Url: x -Requires: d -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-1/d1.spec b/t/data/SPECS/split-transactions--strict-require-1/d1.spec deleted file mode 100644 index 315d23e2..00000000 --- a/t/data/SPECS/split-transactions--strict-require-1/d1.spec +++ /dev/null @@ -1,14 +0,0 @@ -Summary: x -Name: d1 -Version: 1 -Release: 1 -License: x -Group: x -Url: x -Provides: d -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-1/d2.spec b/t/data/SPECS/split-transactions--strict-require-1/d2.spec deleted file mode 100644 index 02a66360..00000000 --- a/t/data/SPECS/split-transactions--strict-require-1/d2.spec +++ /dev/null @@ -1,13 +0,0 @@ -Summary: x -Name: d2 -Version: 1 -Release: 1 -License: x -Group: x -Url: x -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-2/a.spec b/t/data/SPECS/split-transactions--strict-require-2/a.spec deleted file mode 100644 index 8c506dea..00000000 --- a/t/data/SPECS/split-transactions--strict-require-2/a.spec +++ /dev/null @@ -1,14 +0,0 @@ -Summary: x -Name: a -Version: 2 -Release: 1 -License: x -Group: x -Url: x -Requires: b = 2 -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-2/b.spec b/t/data/SPECS/split-transactions--strict-require-2/b.spec deleted file mode 100644 index 61c0beca..00000000 --- a/t/data/SPECS/split-transactions--strict-require-2/b.spec +++ /dev/null @@ -1,13 +0,0 @@ -Summary: x -Name: b -Version: 2 -Release: 1 -License: x -Group: x -Url: x -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-2/d1.spec b/t/data/SPECS/split-transactions--strict-require-2/d1.spec deleted file mode 100644 index ff13b4a7..00000000 --- a/t/data/SPECS/split-transactions--strict-require-2/d1.spec +++ /dev/null @@ -1,13 +0,0 @@ -Summary: x -Name: d1 -Version: 2 -Release: 1 -License: x -Group: x -Url: x -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/data/SPECS/split-transactions--strict-require-2/d2.spec b/t/data/SPECS/split-transactions--strict-require-2/d2.spec deleted file mode 100644 index 2e36fa7a..00000000 --- a/t/data/SPECS/split-transactions--strict-require-2/d2.spec +++ /dev/null @@ -1,14 +0,0 @@ -Summary: x -Name: d2 -Version: 2 -Release: 1 -License: x -Group: x -Url: x -Provides: d -BuildRoot: %{_tmppath}/%{name} - -%description -x - -%files diff --git a/t/superuser--split-transactions--promote.t b/t/superuser--split-transactions--promote.t new file mode 100644 index 00000000..9fa39dc3 --- /dev/null +++ b/t/superuser--split-transactions--promote.t @@ -0,0 +1,50 @@ +#!/usr/bin/perl + +# a-1 requires b-1 +# a-2 requires b-2 +# +# c requires d +# d1-1 provides d, but not d1-2 +# d2-2 provides d, but not d2-1 +use strict; +use lib '.', 't'; +use helper; +use urpm::util; +use Test::More 'no_plan'; + +need_root_and_prepare(); + +my $name = 'split-transactions--strict-require'; +urpmi_addmedia("$name-1 $::pwd/media/$name-1"); +urpmi_addmedia("$name-2 $::pwd/media/$name-2"); + +#- below need the promotion of "a-2" (upgraded from "a-1") to work +test_ab('--split-length 0 b'); +test_ab('--split-level 1 b'); + +test_ab('--split-length 0 --auto-select'); +test_ab('--split-level 1 --auto-select'); + +#- below need the promotion of "d2" (new installed package) to work +test_cd('--split-length 0 d1'); +test_cd('--split-level 1 d1'); + +sub test_ab { + my ($para) = @_; + + urpmi("--media $name-1 --auto a b"); + check_installed_names('a', 'b'); + + urpmi("--media $name-2 --auto $para"); + check_installed_fullnames_and_remove('a-2-1', 'b-2-1'); +} + +sub test_cd { + my ($para) = @_; + + urpmi("--media $name-1 --auto c"); + check_installed_names('c', 'd1'); + + urpmi("--media $name-2 --auto $para"); + check_installed_fullnames_and_remove('c-1-1', 'd1-2-1', 'd2-2-1'); +} diff --git a/t/superuser--split-transactions--strict-require.t b/t/superuser--split-transactions--strict-require.t deleted file mode 100644 index 9fa39dc3..00000000 --- a/t/superuser--split-transactions--strict-require.t +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/perl - -# a-1 requires b-1 -# a-2 requires b-2 -# -# c requires d -# d1-1 provides d, but not d1-2 -# d2-2 provides d, but not d2-1 -use strict; -use lib '.', 't'; -use helper; -use urpm::util; -use Test::More 'no_plan'; - -need_root_and_prepare(); - -my $name = 'split-transactions--strict-require'; -urpmi_addmedia("$name-1 $::pwd/media/$name-1"); -urpmi_addmedia("$name-2 $::pwd/media/$name-2"); - -#- below need the promotion of "a-2" (upgraded from "a-1") to work -test_ab('--split-length 0 b'); -test_ab('--split-level 1 b'); - -test_ab('--split-length 0 --auto-select'); -test_ab('--split-level 1 --auto-select'); - -#- below need the promotion of "d2" (new installed package) to work -test_cd('--split-length 0 d1'); -test_cd('--split-level 1 d1'); - -sub test_ab { - my ($para) = @_; - - urpmi("--media $name-1 --auto a b"); - check_installed_names('a', 'b'); - - urpmi("--media $name-2 --auto $para"); - check_installed_fullnames_and_remove('a-2-1', 'b-2-1'); -} - -sub test_cd { - my ($para) = @_; - - urpmi("--media $name-1 --auto c"); - check_installed_names('c', 'd1'); - - urpmi("--media $name-2 --auto $para"); - check_installed_fullnames_and_remove('c-1-1', 'd1-2-1', 'd2-2-1'); -} -- cgit v1.2.1