aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 12:43:23 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-02-05 12:43:23 +0000
commit192ffbc8a58d7de78e936dc19ae63b84da868cb3 (patch)
treecac086e97f477101e1a849fdc8d5e083aff50ea4
parent1ade06d1720f69e46deaa080dadd2973d5dcd6d7 (diff)
downloadpaludis-192ffbc8a58d7de78e936dc19ae63b84da868cb3.tar.gz
paludis-192ffbc8a58d7de78e936dc19ae63b84da868cb3.tar.xz
Test unfixable blockers
-rw-r--r--paludis/resolver/resolver_TEST_blockers.cc35
-rwxr-xr-xpaludis/resolver/resolver_TEST_blockers_setup.sh20
2 files changed, 55 insertions, 0 deletions
diff --git a/paludis/resolver/resolver_TEST_blockers.cc b/paludis/resolver/resolver_TEST_blockers.cc
index 758618c..f3c0dac 100644
--- a/paludis/resolver/resolver_TEST_blockers.cc
+++ b/paludis/resolver/resolver_TEST_blockers.cc
@@ -102,5 +102,40 @@ namespace test_cases
}
}
} test_hard_blocker;
+
+ struct TestUnfixableBlocker : ResolverBlockersTestCase
+ {
+ TestUnfixableBlocker() : ResolverBlockersTestCase("unfixable") { }
+
+ void run()
+ {
+ install("unfixable", "a-pkg", "1");
+
+ std::tr1::shared_ptr<const ResolverLists> resolutions(get_resolutions("unfixable/target"));
+
+ {
+ TestMessageSuffix s("taken errors");
+ check_resolution_list(resolutions->jobs(), resolutions->taken_error_job_ids(), ResolutionListChecks()
+ .kind("unable_to_make_decision", QualifiedPackageName("unfixable/a-pkg"))
+ .finished()
+ );
+ }
+
+ {
+ TestMessageSuffix s("untaken errors");
+ check_resolution_list(resolutions->jobs(), resolutions->untaken_error_job_ids(), ResolutionListChecks()
+ .finished()
+ );
+ }
+
+ {
+ TestMessageSuffix s("ordered");
+ check_resolution_list(resolutions->jobs(), resolutions->taken_job_ids(), ResolutionListChecks()
+ .qpn(QualifiedPackageName("unfixable/target"))
+ .finished()
+ );
+ }
+ }
+ } test_unfixable_blocker;
}
diff --git a/paludis/resolver/resolver_TEST_blockers_setup.sh b/paludis/resolver/resolver_TEST_blockers_setup.sh
index afea487..9d7dd4c 100755
--- a/paludis/resolver/resolver_TEST_blockers_setup.sh
+++ b/paludis/resolver/resolver_TEST_blockers_setup.sh
@@ -41,5 +41,25 @@ PLATFORMS="test"
SLOT="0"
END
+# unfixable
+echo 'unfixable' >> metadata/categories.conf
+
+mkdir -p 'packages/unfixable/target'
+cat <<END > packages/unfixable/target/target-1.exheres-0
+SUMMARY="target"
+PLATFORMS="test"
+SLOT="0"
+DEPENDENCIES="
+ ( !unfixable/a-pkg )
+ "
+END
+
+mkdir -p 'packages/unfixable/a-pkg'
+cat <<END > packages/unfixable/a-pkg/a-pkg-2.exheres-0
+SUMMARY="dep"
+PLATFORMS="test"
+SLOT="0"
+END
+
cd ..