aboutsummaryrefslogtreecommitdiff
path: root/libbrep/build-package.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/build-package.hxx
parentca708a3f172e2f0ffab8638087b3e478de06b996 (diff)
Add support for test-exclude task manifest value
Diffstat (limited to 'libbrep/build-package.hxx')
-rw-r--r--libbrep/build-package.hxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/libbrep/build-package.hxx b/libbrep/build-package.hxx
index 702f937..228c5c0 100644
--- a/libbrep/build-package.hxx
+++ b/libbrep/build-package.hxx
@@ -68,6 +68,19 @@ namespace brep
build_repository (): canonical_name (id.canonical_name) {}
};
+ // Forward declarations.
+ //
+ class build_package;
+
+ // Build package test dependency.
+ //
+ #pragma db value
+ struct build_dependency
+ {
+ package_name name;
+ lazy_shared_ptr<build_package> package;
+ };
+
// Foreign object that is mapped to a subset of the package object.
//
#pragma db object table("build_package") pointer(shared_ptr) readonly session
@@ -76,6 +89,14 @@ namespace brep
public:
package_id id;
upstream_version version;
+
+ // Mapped to the package object tests, examples, and benchmarks members
+ // using the PostgreSQL foreign table mechanism.
+ //
+ small_vector<build_dependency, 1> tests;
+ small_vector<build_dependency, 1> examples;
+ small_vector<build_dependency, 1> benchmarks;
+
lazy_shared_ptr<build_repository> internal_repository;
bool buildable;
@@ -89,10 +110,16 @@ namespace brep
//
build_constraints constraints;
+ bool
+ internal () const noexcept {return internal_repository != nullptr;}
+
// Database mapping.
//
#pragma db member(id) id column("")
#pragma db member(version) set(this.version.init (this.id.version, (?)))
+ #pragma db member(tests) id_column("") value_column("dep_")
+ #pragma db member(examples) id_column("") value_column("dep_")
+ #pragma db member(benchmarks) id_column("") value_column("dep_")
#pragma db member(builds) id_column("") value_column("")
#pragma db member(constraints) id_column("") value_column("")