diff options
-rw-r--r-- | bbot/worker/worker.cxx | 58 | ||||
-rw-r--r-- | tests/integration/testscript | 16 |
2 files changed, 70 insertions, 4 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 7ad9e30..69a0f28 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -61,8 +61,10 @@ namespace bbot const size_t tftp_get_timeout (10); // 10 seconds. const size_t tftp_get_retries (3); // Task request retries (see startup()). - const dir_path bpkg_dir (".bpkg"); - const dir_path repos_dir (dir_path (bpkg_dir) /= "repos"); + const dir_path bpkg_dir (".bpkg"); + const dir_path repos_dir (dir_path (bpkg_dir) /= "repos"); + const dir_path host_dir (dir_path (bpkg_dir) /= "host"); + const dir_path build2_dir (dir_path (bpkg_dir) /= "build2"); } static bool @@ -4962,6 +4964,11 @@ build (size_t argc, const char* argv[]) // if (has_runtime_tests || has_buildtime_tests) { + // Stash the absolute path of the initial build target + // configuration. + // + const dir_path& init_target_conf (target_conf); + // Create the required build configurations. // dir_path target_conf ("build-installed-bpkg"); @@ -5165,6 +5172,53 @@ build (size_t argc, const char* argv[]) if (!r.status) break; } + + // If for the target package the initial build target + // configuration contains the private host and/or module + // configurations, then it may mean that the external + // (runtime) tests for this package use some tools and/or + // modules. Not to rebuild them again for the test install + // case, we will just link these private configurations to the + // installed test target configuration. This way the external + // tests, built and executed against the installed main + // package, can reuse the already built tools and/or modules. + // + if (target_pkg) + { + dir_path hc (init_target_conf / host_dir); + + if (exists (hc)) + { + r.status |= run_bpkg ( + b, + trace, r.log, wre, + bkp_step, bkp_status, aux_env, last_cmd, + "-v", + "link", + "-d", target_conf, + hc); + + if (!r.status) + break; + } + + dir_path mc (init_target_conf / build2_dir); + + if (exists (mc)) + { + r.status |= run_bpkg ( + b, + trace, r.log, wre, + bkp_step, bkp_status, aux_env, last_cmd, + "-v", + "link", + "-d", target_conf, + mc); + + if (!r.status) + break; + } + } } if (create_host) diff --git a/tests/integration/testscript b/tests/integration/testscript index 8d6ad4e..bf40718 100644 --- a/tests/integration/testscript +++ b/tests/integration/testscript @@ -412,8 +412,10 @@ ver = 2.5.0-b.28.20241009172401.fa4b44129d84 rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#master" rep_type = git rfp = yes -tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=sqlite' +tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=sqlite +tests: odb-examples == '"$ver"' ? (!$defined(config.odb_examples.database)) config.odb_examples.database=sqlite' #\ + #\ package_config = 'package-config: \ @@ -427,7 +429,8 @@ ver = 2.5.0-b.26.20240131175206.1c7f67f47770 rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#master" rep_type = git rfp = yes -tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=pgsql' +tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=pgsql +tests: odb-examples == '"$ver"' ? (!$defined(config.odb_examples.database)) config.odb_examples.database=pgsql' #\ #\ package_config = 'package-config: @@ -470,6 +473,15 @@ rep_type = git rfp = yes #\ +#\ +pkg = libQt6Widgets +ver = 6.7.3 +rep_url = "https://github.com/build2-packaging/Qt6.git#master" +rep_type = git +rfp = yes +tests="tests: libQt6WidgetsTests == $ver" +#\ + #interactive="interactive: b.test-installed.configure" #interactive="interactive: warning" #\ |