From 8e257991d80277950915a77857ea7e724001b195 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 25 Oct 2019 23:33:46 +0300 Subject: Add support for tests, examples, and benchmark package manifest values --- libbrep/package.cxx | 6 ++ libbrep/package.hxx | 23 ++++- libbrep/package.xml | 258 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+), 4 deletions(-) (limited to 'libbrep') diff --git a/libbrep/package.cxx b/libbrep/package.cxx index fe216d2..e6c543d 100644 --- a/libbrep/package.cxx +++ b/libbrep/package.cxx @@ -73,6 +73,9 @@ namespace brep optional bee, dependencies_type dp, requirements_type rq, + small_vector ts, + small_vector es, + small_vector bms, build_class_exprs bs, build_constraints_type bc, optional lc, @@ -104,6 +107,9 @@ namespace brep build_error_email (move (bee)), dependencies (move (dp)), requirements (move (rq)), + tests (move (ts)), + examples (move (es)), + benchmarks (move (bms)), builds (move (bs)), build_constraints (!stub () ? move (bc) : build_constraints_type ()), internal_repository (move (rp)), diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 9733374..b9a7c00 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -21,7 +21,7 @@ // #define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 14 -#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 16, closed) +#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 17, closed) namespace brep { @@ -86,9 +86,9 @@ namespace brep // dependencies // - using bpkg::dependency_constraint; + using bpkg::version_constraint; - #pragma db value(dependency_constraint) definition + #pragma db value(version_constraint) definition // Notes: // @@ -139,7 +139,7 @@ namespace brep using package_type = brep::package; package_name name; - optional constraint; + optional constraint; // Resolved dependency package. NULL if the repository load was shallow // and so the package dependencies are not resolved. @@ -389,6 +389,9 @@ namespace brep optional build_error_email, dependencies_type, requirements_type, + small_vector tests, + small_vector examples, + small_vector benchmarks, build_class_exprs, build_constraints_type, optional location, @@ -449,6 +452,9 @@ namespace brep optional build_error_email; dependencies_type dependencies; requirements_type requirements; + small_vector tests; + small_vector examples; + small_vector benchmarks; build_class_exprs builds; // Note: foreign-mapped in build. build_constraints_type build_constraints; // Note: foreign-mapped in build. @@ -552,6 +558,15 @@ namespace brep set(odb::nested_set (this.requirements, std::move (?))) \ id_column("") key_column("") value_column("id") + // tests, examples, benchmarks + // + // Seeing that these reuse the dependency types, we are also going to + // have identical database mapping. + // + #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_") + // builds // #pragma db member(builds) id_column("") value_column("") \ diff --git a/libbrep/package.xml b/libbrep/package.xml index 2acba62..170ba7c 100644 --- a/libbrep/package.xml +++ b/libbrep/package.xml @@ -1,4 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1