summaryrefslogtreecommitdiffstats
path: root/t/superuser--handle-conflict-deps2.t
diff options
context:
space:
mode:
Diffstat (limited to 't/superuser--handle-conflict-deps2.t')
-rw-r--r--t/superuser--handle-conflict-deps2.t17
1 files changed, 10 insertions, 7 deletions
diff --git a/t/superuser--handle-conflict-deps2.t b/t/superuser--handle-conflict-deps2.t
index f192faee..a68ba195 100644
--- a/t/superuser--handle-conflict-deps2.t
+++ b/t/superuser--handle-conflict-deps2.t
@@ -22,16 +22,14 @@ need_root_and_prepare();
my $name = 'handle-conflict-deps2';
urpmi_addmedia("$name $::pwd/media/$name");
-# 'c-2','d2-2' is also a valid result; both wanted pkgs can't be installed,
+# these test have two alternative results; both wanted pkgs can't be installed,
# so urpmi can arbitrarily drop one (after confirming with user, of course)
-test(['d1-1', 'c-1'], ['c-2', 'd1-2'], ['c-2', 'd2-2']);
-
-# 'a1-2','b-1' is also a valid result
-test(['a1-1', 'b-1'], ['b-2', 'a1-2'], ['b-1', 'a1-2']);
+test(['d1-1', 'c-1'], ['c-2', 'd1-2'], ['c-1', 'd1-2'], ['c-2', 'd2-2']);
+test(['a1-1', 'b-1'], ['b-2', 'a1-2'], ['a2-2', 'b-2'], ['a1-2', 'b-1']);
sub test {
- my ($first, $wanted, $result) = @_;
+ my ($first, $wanted, $result1, $result2) = @_;
urpmi("--auto @$first");
check_installed_fullnames(map { "$_-1" } @$first);
@@ -41,5 +39,10 @@ sub test {
check_installed_fullnames(map { "$_-1" } @$first);
urpmi("--auto @$wanted");
- check_installed_fullnames_and_remove(map { "$_-1" } @$result);
+
+ if (system("rpm -q --quiet --root $::pwd/root ".@$result1[0]) == 0) {
+ check_installed_fullnames_and_remove(map { "$_-1" } @$result1);
+ } else {
+ check_installed_fullnames_and_remove(map { "$_-1" } @$result2);
+ }
}