aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-task.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-06-22 19:05:08 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-06-26 14:12:12 +0300
commit105524ed96f162b43c0735a65fea284d07356aa2 (patch)
treef083c65946faeb3654f9108112143ba46cee3656 /mod/mod-build-task.cxx
parent8e54ae94ce44d57b49b35269f006fe2bf07ec13d (diff)
Adapt to merging of package external tests, examples, and benchmarks into typed tests
Diffstat (limited to 'mod/mod-build-task.cxx')
-rw-r--r--mod/mod-build-task.cxx53
1 files changed, 23 insertions, 30 deletions
diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx
index 741d3b4..04b2a36 100644
--- a/mod/mod-build-task.cxx
+++ b/mod/mod-build-task.cxx
@@ -228,40 +228,33 @@ handle (request& rq, response& rs)
// configuration.
//
small_vector<package, 1> tes;
- auto add_exclusions = [&tes, &cm, this]
- (const small_vector<build_dependency, 1>& tests)
+
+ for (const build_test_dependency& td: p->tests)
{
- for (const build_dependency& t: tests)
+ // Don't exclude unresolved external tests.
+ //
+ // Note that this may result in the build task failure. However,
+ // silently excluding such tests could end up with missed software
+ // bugs which feels much worse.
+ //
+ if (td.package != nullptr)
{
- // Don't exclude unresolved external tests.
- //
- // Note that this may result in the build task failure. However,
- // silently excluding such tests could end up with missed software
- // bugs which feels much worse.
- //
- if (t.package != nullptr)
- {
- shared_ptr<build_package> p (t.package.load ());
+ shared_ptr<build_package> p (td.package.load ());
- // Use the `all` class as a least restrictive default underlying
- // build class set. Note that we should only apply the explicit
- // build restrictions to the external test packages (think about
- // the `builds: all` and `builds: -windows` manifest values for
- // the primary and external test packages, respectively).
- //
- if (exclude (p->builds,
- p->constraints,
- *cm.config,
- nullptr /* reason */,
- true /* default_all_ucs */))
- tes.push_back (package {move (p->id.name), move (p->version)});
- }
+ // Use the `all` class as a least restrictive default underlying
+ // build class set. Note that we should only apply the explicit
+ // build restrictions to the external test packages (think about
+ // the `builds: all` and `builds: -windows` manifest values for
+ // the primary and external test packages, respectively).
+ //
+ if (exclude (p->builds,
+ p->constraints,
+ *cm.config,
+ nullptr /* reason */,
+ true /* default_all_ucs */))
+ tes.push_back (package {move (p->id.name), move (p->version)});
}
- };
-
- add_exclusions (p->tests);
- add_exclusions (p->examples);
- add_exclusions (p->benchmarks);
+ }
task_manifest task (move (b->package_name),
move (b->package_version),