aboutsummaryrefslogtreecommitdiff
path: root/libbrep/common.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-04-01 21:50:16 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-04-06 18:42:14 +0300
commitf11d8c32c01ab1ac13268484b9e85732176a47d9 (patch)
tree960473ad9016458dde5f8a092b9715c77888aaac /libbrep/common.hxx
parentca708a3f172e2f0ffab8638087b3e478de06b996 (diff)
Add support for test-exclude task manifest value
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r--libbrep/common.hxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx
index b7fc2da..73353c7 100644
--- a/libbrep/common.hxx
+++ b/libbrep/common.hxx
@@ -323,6 +323,38 @@ namespace brep
#pragma db value(build_constraint) definition
+ // The primary reason why a package is unbuildable by the build bot
+ // controller service.
+ //
+ enum class unbuildable_reason: std::uint8_t
+ {
+ stub, // A stub, otherwise
+ test, // A separate test (built as part of primary), otherwise
+ external, // From an external repository, otherwise
+ unbuildable // From an internal unbuildable repository.
+ };
+
+ string
+ to_string (unbuildable_reason);
+
+ unbuildable_reason
+ to_unbuildable_reason (const string&); // May throw invalid_argument.
+
+ inline ostream&
+ operator<< (ostream& os, unbuildable_reason r) {return os << to_string (r);}
+
+ using optional_unbuildable_reason = optional<unbuildable_reason>;
+
+ #pragma db map type(unbuildable_reason) as(string) \
+ to(to_string (?)) \
+ from(brep::to_unbuildable_reason (?))
+
+ #pragma db map type(optional_unbuildable_reason) as(brep::optional_string) \
+ to((?) ? to_string (*(?)) : brep::optional_string ()) \
+ from((?) \
+ ? brep::to_unbuildable_reason (*(?)) \
+ : brep::optional_unbuildable_reason ()) \
+
// Version comparison operators.
//
// They allow comparing objects that have epoch, canonical_upstream,