From d4a64f8409d872c9ed8e969979d466b320eca927 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 10 Sep 2021 15:02:47 +0300 Subject: Verify that build system modules don't have runtime external tests --- bpkg/rep-fetch.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) 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, shared_ptr>> tps ( filter (rfs, -- cgit v1.1