diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-09-10 15:02:47 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-09-17 14:35:03 +0300 |
commit | d4a64f8409d872c9ed8e969979d466b320eca927 (patch) | |
tree | 20e0242554a2bec3d088cbf27850803877db45cf | |
parent | 1d561cd932e95412877f220fec14f1cd067c53b1 (diff) |
Verify that build system modules don't have runtime external tests
-rw-r--r-- | bpkg/rep-fetch.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx index a3480d0..af98c4e 100644 --- a/bpkg/rep-fetch.cxx +++ b/bpkg/rep-fetch.cxx @@ -1428,8 +1428,19 @@ namespace bpkg for (const package_location& pl: p->locations) rfs.push_back (pl.repository_fragment.load ()); + bool module (build2_module (p->id.name)); + for (const test_dependency& td: p->tests) { + // Verify that the package has no runtime tests if it is a build + // system module. + // + if (module && !td.buildtime) + fail << "run-time " << td.type << ' ' << td.name << " for build " + << "system module " + << package_string (p->id.name, p->version) << + info << "build system modules cannot have run-time " << td.type; + vector<pair<shared_ptr<available_package>, shared_ptr<repository_fragment>>> tps ( filter (rfs, |