aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-10 22:53:43 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-11 17:16:34 +0100
commit5c3b0a2054fa6b030e1c531476727ab649b1e500 (patch)
treefca9f2590e8e64134cc3b3f504eb3e250fff3cb8
parenta99f46ae26d0679ec1b815faf33787686b071000 (diff)
downloadpaludis-5c3b0a2054fa6b030e1c531476727ab649b1e500.tar.gz
paludis-5c3b0a2054fa6b030e1c531476727ab649b1e500.tar.xz
test labels, mapped to build: for now
-rw-r--r--paludis/dep_label-fwd.hh16
-rw-r--r--paludis/dep_label.cc1
-rw-r--r--paludis/dep_label.hh3
-rw-r--r--paludis/dep_list.cc5
-rw-r--r--paludis/repositories/e/dep_parser.cc2
-rw-r--r--paludis/repositories/e/dependencies_rewriter.cc5
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf4
-rw-r--r--paludis/resolver/resolver.cc6
-rw-r--r--paludis/resolver/resolver_test.cc5
-rw-r--r--paludis/show_suggest_visitor.cc5
-rw-r--r--ruby/dep_label.cc8
-rw-r--r--src/clients/cave/cmd_resolve.cc6
12 files changed, 64 insertions, 2 deletions
diff --git a/paludis/dep_label-fwd.hh b/paludis/dep_label-fwd.hh
index 76b3705..56bdd4d 100644
--- a/paludis/dep_label-fwd.hh
+++ b/paludis/dep_label-fwd.hh
@@ -197,6 +197,22 @@ namespace paludis
typedef ConcreteDependenciesLabel<DependenciesRecommendationLabelTag> DependenciesRecommendationLabel;
/**
+ * Tag for DependenciesTestLabel.
+ *
+ * \since 0.42
+ * \ingroup g_dep_spec
+ */
+ struct DependenciesTestLabelTag;
+
+ /**
+ * Dependencies label.
+ *
+ * \since 0.42
+ * \ingroup g_dep_spec
+ */
+ typedef ConcreteDependenciesLabel<DependenciesTestLabelTag> DependenciesTestLabel;
+
+ /**
* A collection of DependencyLabel instances.
*
* \ingroup g_dep_spec
diff --git a/paludis/dep_label.cc b/paludis/dep_label.cc
index 204fc49..8e9f68a 100644
--- a/paludis/dep_label.cc
+++ b/paludis/dep_label.cc
@@ -105,4 +105,5 @@ template class ConcreteDependenciesLabel<DependenciesFetchLabelTag>;
template class ConcreteDependenciesLabel<DependenciesInstallLabelTag>;
template class ConcreteDependenciesLabel<DependenciesSuggestionLabelTag>;
template class ConcreteDependenciesLabel<DependenciesRecommendationLabelTag>;
+template class ConcreteDependenciesLabel<DependenciesTestLabelTag>;
diff --git a/paludis/dep_label.hh b/paludis/dep_label.hh
index 06c9775..79ce48e 100644
--- a/paludis/dep_label.hh
+++ b/paludis/dep_label.hh
@@ -109,7 +109,7 @@ namespace paludis
public virtual DeclareAbstractAcceptMethods<DependenciesLabel, MakeTypeList<
DependenciesBuildLabel, DependenciesRunLabel, DependenciesPostLabel, DependenciesCompileAgainstLabel,
DependenciesFetchLabel, DependenciesInstallLabel, DependenciesSuggestionLabel,
- DependenciesRecommendationLabel>::Type>
+ DependenciesRecommendationLabel, DependenciesTestLabel>::Type>
{
public:
///\name Basic operations
@@ -171,6 +171,7 @@ namespace paludis
extern template class ConcreteDependenciesLabel<DependenciesInstallLabelTag>;
extern template class ConcreteDependenciesLabel<DependenciesSuggestionLabelTag>;
extern template class ConcreteDependenciesLabel<DependenciesRecommendationLabelTag>;
+ extern template class ConcreteDependenciesLabel<DependenciesTestLabelTag>;
#endif
}
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 76ee6df..8bbd9d4 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -331,6 +331,11 @@ namespace
return false;
}
+ bool visit(const DependenciesTestLabel &) const
+ {
+ return false;
+ }
+
bool visit(const DependenciesRunLabel &) const
{
return false;
diff --git a/paludis/repositories/e/dep_parser.cc b/paludis/repositories/e/dep_parser.cc
index 4bd3c58..55bdc57 100644
--- a/paludis/repositories/e/dep_parser.cc
+++ b/paludis/repositories/e/dep_parser.cc
@@ -703,6 +703,8 @@ paludis::erepository::parse_dependency_label(const std::string & s, const EAPI &
l->add_label(make_shared_ptr(new DependenciesSuggestionLabel(*it)));
else if (c == "DependenciesRecommendationLabel")
l->add_label(make_shared_ptr(new DependenciesRecommendationLabel(*it)));
+ else if (c == "DependenciesTestLabel")
+ l->add_label(make_shared_ptr(new DependenciesTestLabel(*it)));
else
throw EDepParseError(s, "Label '" + *it + "' maps to unknown class '" + c + "'");
}
diff --git a/paludis/repositories/e/dependencies_rewriter.cc b/paludis/repositories/e/dependencies_rewriter.cc
index 6ce507e..c5b34cf 100644
--- a/paludis/repositories/e/dependencies_rewriter.cc
+++ b/paludis/repositories/e/dependencies_rewriter.cc
@@ -234,6 +234,11 @@ namespace
d.append(" " + s + get_annotations(a));
}
+ void visit(const DependenciesTestLabel &)
+ {
+ d.append(" " + s + get_annotations(a));
+ }
+
void visit(const DependenciesFetchLabel &)
{
d.append(" " + s + get_annotations(a));
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 948d020..2c79388 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -305,7 +305,9 @@ dependency_labels = \
compile-against = DependenciesCompileAgainstLabel ; \
fetch = DependenciesFetchLabel ; \
recommendation = DependenciesRecommendationLabel ; \
- suggestion = DependenciesSuggestionLabel
+ suggestion = DependenciesSuggestionLabel ; \
+ test = DependenciesTestLabel ; \
+ test-expensive = DependenciesTestLabel
restrict_mirror = mirror
restrict_fetch = fetch
diff --git a/paludis/resolver/resolver.cc b/paludis/resolver/resolver.cc
index 667cdca..ad74f1e 100644
--- a/paludis/resolver/resolver.cc
+++ b/paludis/resolver/resolver.cc
@@ -851,6 +851,12 @@ namespace
ignorable = false;
}
+ void visit(const DependenciesTestLabel &)
+ {
+ causes_pre_arrow = true;
+ ignorable = false;
+ }
+
void visit(const DependenciesRunLabel &)
{
causes_pre_arrow = true;
diff --git a/paludis/resolver/resolver_test.cc b/paludis/resolver/resolver_test.cc
index 5de0dbd..d45fce2 100644
--- a/paludis/resolver/resolver_test.cc
+++ b/paludis/resolver/resolver_test.cc
@@ -132,6 +132,11 @@ namespace
seen_not_suggestion = true;
}
+ void visit(const DependenciesTestLabel &)
+ {
+ seen_not_suggestion = true;
+ }
+
void visit(const DependenciesRunLabel &)
{
seen_not_suggestion = true;
diff --git a/paludis/show_suggest_visitor.cc b/paludis/show_suggest_visitor.cc
index f60075c..8261b88 100644
--- a/paludis/show_suggest_visitor.cc
+++ b/paludis/show_suggest_visitor.cc
@@ -123,6 +123,11 @@ namespace
return false;
}
+ bool visit(const DependenciesTestLabel &) const
+ {
+ return false;
+ }
+
bool visit(const DependenciesRunLabel &) const
{
return false;
diff --git a/ruby/dep_label.cc b/ruby/dep_label.cc
index 9981bb4..206b688 100644
--- a/ruby/dep_label.cc
+++ b/ruby/dep_label.cc
@@ -46,6 +46,7 @@ namespace
static VALUE c_dependencies_label;
static VALUE c_dependencies_build_label;
+ static VALUE c_dependencies_test_label;
static VALUE c_dependencies_compile_against_label;
static VALUE c_dependencies_fetch_label;
static VALUE c_dependencies_install_label;
@@ -141,6 +142,12 @@ namespace
new std::tr1::shared_ptr<const DependenciesLabel>(mm));
}
+ void visit(const DependenciesTestLabel &)
+ {
+ value = Data_Wrap_Struct(c_dependencies_test_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
+ new std::tr1::shared_ptr<const DependenciesLabel>(mm));
+ }
+
void visit(const DependenciesRunLabel &)
{
value = Data_Wrap_Struct(c_dependencies_run_label, 0, &Common<std::tr1::shared_ptr<const DependenciesLabel> >::free,
@@ -244,6 +251,7 @@ namespace
rb_define_method(c_dependencies_label, "to_s", RUBY_FUNC_CAST(&dependencies_label_text), 0);
c_dependencies_build_label = rb_define_class_under(paludis_module(), "DependenciesBuildLabel", c_dependencies_label);
+ c_dependencies_test_label = rb_define_class_under(paludis_module(), "DependenciesTestLabel", c_dependencies_label);
c_dependencies_run_label = rb_define_class_under(paludis_module(), "DependenciesRunLabel", c_dependencies_label);
c_dependencies_post_label = rb_define_class_under(paludis_module(), "DependenciesPostLabel", c_dependencies_label);
c_dependencies_install_label = rb_define_class_under(paludis_module(), "DependenciesInstallLabel", c_dependencies_label);
diff --git a/src/clients/cave/cmd_resolve.cc b/src/clients/cave/cmd_resolve.cc
index a91ee2a..0e79249 100644
--- a/src/clients/cave/cmd_resolve.cc
+++ b/src/clients/cave/cmd_resolve.cc
@@ -94,6 +94,12 @@ namespace
seen_buildish_dep = true;
}
+ void visit(const DependenciesTestLabel &)
+ {
+ is_requirement = true;
+ seen_buildish_dep = true;
+ }
+
void visit(const DependenciesFetchLabel &)
{
is_requirement = true;