From 12fc02682f4a7ba64ae765d925b03946ca46c787 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sat, 23 Jan 2010 05:51:38 +0000 Subject: testsuite: When trying to install two conflicting packages, consider the tests passed if either of them is installed succesfully after alerting the user. --- t/superuser--handle-conflict-deps.t | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 't/superuser--handle-conflict-deps.t') diff --git a/t/superuser--handle-conflict-deps.t b/t/superuser--handle-conflict-deps.t index 24197604..e5c45a3e 100644 --- a/t/superuser--handle-conflict-deps.t +++ b/t/superuser--handle-conflict-deps.t @@ -39,10 +39,20 @@ sub test_conflict_on_upgrade { sub test_conflict_on_install { urpmi('--auto a b'); - check_installed_and_remove('b', 'b-sub'); # WARNING: either a or b is chosen, depending on hdlist order + # either a or b is chosen, depending on hdlist order; both are valid + if (system("rpm -q --quiet --root $::pwd/root a") == 0) { + check_installed_and_remove('a'); + } else { + check_installed_and_remove('b', 'b-sub'); + } urpmi('--auto f g'); # test for bug #52135 - check_installed_and_remove('f'); + # either f or g is chosen, depending on hdlist order; both are valid + if (system("rpm -q --quiet --root $::pwd/root f") == 0) { + check_installed_and_remove('f'); + } else { + check_installed_and_remove('g'); + } } sub test_simple { -- cgit v1.2.1