aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-02-11 20:10:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-02-11 20:14:11 +0300
commit818cde70e20ff897932c4abaca63c446a9ec5561 (patch)
treee991199a0fc1261851429fc35b70bd18906819ff
parent4cb81fd80a63004c08ba49ce9265318d5ba39082 (diff)
Add support for reflect clause in tests package manifest value
-rw-r--r--libbrep/build-extra.sql3
-rw-r--r--libbrep/build-package.hxx1
-rw-r--r--libbrep/build.hxx2
-rw-r--r--libbrep/build.xml2
-rw-r--r--libbrep/package.hxx27
-rw-r--r--libbrep/package.xml6
-rw-r--r--load/load.cxx3
-rw-r--r--mod/mod-build-task.cxx3
8 files changed, 31 insertions, 16 deletions
diff --git a/libbrep/build-extra.sql b/libbrep/build-extra.sql
index a2960ba..2c204e6 100644
--- a/libbrep/build-extra.sql
+++ b/libbrep/build-extra.sql
@@ -133,7 +133,8 @@ CREATE FOREIGN TABLE build_package_tests (
test_package_version_canonical_release TEXT NULL COLLATE "C",
test_package_version_revision INTEGER NULL,
test_type TEXT NOT NULL,
- test_buildtime BOOLEAN NOT NULL)
+ test_buildtime BOOLEAN NOT NULL,
+ test_reflect TEXT NULL)
SERVER package_server OPTIONS (table_name 'package_tests');
-- The foreign table for the build_package object builds member (that is of a
diff --git a/libbrep/build-package.hxx b/libbrep/build-package.hxx
index c46119d..54edc2b 100644
--- a/libbrep/build-package.hxx
+++ b/libbrep/build-package.hxx
@@ -97,6 +97,7 @@ namespace brep
{
test_dependency_type type;
bool buildtime;
+ optional<string> reflect;
};
// Foreign object that is mapped to a subset of the package object.
diff --git a/libbrep/build.hxx b/libbrep/build.hxx
index 968a91f..8662cec 100644
--- a/libbrep/build.hxx
+++ b/libbrep/build.hxx
@@ -30,7 +30,7 @@
//
#define LIBBREP_BUILD_SCHEMA_VERSION_BASE 15
-#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 17, closed)
+#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 18, closed)
// We have to keep these mappings at the global scope instead of inside
// the brep namespace because they need to be also effective in the
diff --git a/libbrep/build.xml b/libbrep/build.xml
index 92b83af..7828df1 100644
--- a/libbrep/build.xml
+++ b/libbrep/build.xml
@@ -1,4 +1,6 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="build" version="1">
+ <changeset version="18"/>
+
<changeset version="17"/>
<changeset version="16"/>
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index d0ac23f..8b0613e 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -20,7 +20,7 @@
//
#define LIBBREP_PACKAGE_SCHEMA_VERSION_BASE 21
-#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 24, closed)
+#pragma db model version(LIBBREP_PACKAGE_SCHEMA_VERSION_BASE, 25, closed)
namespace brep
{
@@ -170,15 +170,15 @@ namespace brep
dependency_alternative () = default;
dependency_alternative (optional<string> e,
- butl::optional<std::string> r,
- butl::optional<std::string> p,
- butl::optional<std::string> a,
- butl::optional<std::string> q)
- : enable (std::move (e)),
- reflect (std::move (r)),
- prefer (std::move (p)),
- accept (std::move (a)),
- require (std::move (q)) {}
+ optional<string> r,
+ optional<string> p,
+ optional<string> a,
+ optional<string> q)
+ : enable (move (e)),
+ reflect (move (r)),
+ prefer (move (p)),
+ accept (move (a)),
+ require (move (q)) {}
};
#pragma db value
@@ -202,15 +202,18 @@ namespace brep
{
test_dependency_type type;
bool buildtime;
+ optional<string> reflect;
test_dependency () = default;
test_dependency (package_name n,
test_dependency_type t,
bool b,
- optional<version_constraint> c)
+ optional<version_constraint> c,
+ optional<string> r)
: dependency {move (n), move (c), nullptr /* package */},
type (t),
- buildtime (b)
+ buildtime (b),
+ reflect (move (r))
{
}
diff --git a/libbrep/package.xml b/libbrep/package.xml
index ee177a8..e556f63 100644
--- a/libbrep/package.xml
+++ b/libbrep/package.xml
@@ -1,4 +1,10 @@
<changelog xmlns="http://www.codesynthesis.com/xmlns/odb/changelog" database="pgsql" schema-name="package" version="1">
+ <changeset version="25">
+ <alter-table name="package_tests">
+ <add-column name="test_reflect" type="TEXT" null="true"/>
+ </alter-table>
+ </changeset>
+
<changeset version="24">
<alter-table name="package_dependencies">
<drop-column name="conditional"/>
diff --git a/load/load.cxx b/load/load.cxx
index ad5379e..691afb6 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -546,7 +546,8 @@ load_packages (const shared_ptr<repository>& rp,
ts.emplace_back (move (td.name),
td.type,
td.buildtime,
- move (td.constraint));
+ move (td.constraint),
+ move (td.reflect));
}
// Cache before the package name is moved.
diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx
index ec937fd..29c048d 100644
--- a/mod/mod-build-task.cxx
+++ b/mod/mod-build-task.cxx
@@ -275,7 +275,8 @@ handle (request& rq, response& rs)
tests.emplace_back (move (td.name),
td.type,
td.buildtime,
- move (td.constraint));
+ move (td.constraint),
+ move (td.reflect));
}
bool module_pkg (