diff options
-rw-r--r-- | bbot/worker/worker.cxx | 115 | ||||
-rw-r--r-- | tests/integration/testscript | 4 |
2 files changed, 55 insertions, 64 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 8e4ec3a..2d87968 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -1245,7 +1245,7 @@ build (size_t argc, const char* argv[]) // non-self-hosted configurations. // // Actually, it could make sense to build and install tools and module - // from a target configuration in this case. But that means for a + // from a target configuration in this case. But that means for a // non-self-hosted configuration a tool/module may want to test two // things: its output build and its own build, which means we would need a // way to control which of the two things (or both) are to be tested @@ -2021,9 +2021,9 @@ build (size_t argc, const char* argv[]) } } - // Add the main package configured in the install configuration. + // Add the main package configured in the install configuration and + // the external build-time test packages // - if (create_install) { step_id s (step_id::bpkg_target_configure_build); step_id f1 (step_id::b_configure); @@ -2032,69 +2032,67 @@ build (size_t argc, const char* argv[]) cstrings eas (step_args (env_args, s, f1, f2)); cstrings cas (step_args (config_args, s, f1, f2)); - common_args.push_back ("-d"); - common_args.push_back (install_conf.string ()); - - pkg_args.push_back ("{"); - - pkg_args.push_back ("--config-uuid"); - pkg_args.push_back (install_uuid); - - // Note that we do another re-distribution (with a separate - // --checkout-root) in case the package is missing file that - // are only used during installation. + // Add the main package. // - pkg_args.push_back ("--checkout-root"); - pkg_args.push_back (dist_install_root.string ()); + if (create_install) + { + common_args.push_back ("-d"); + common_args.push_back (install_conf.string ()); - pkg_args.insert (pkg_args.end (), eas.begin (), eas.end ()); - pkg_args.insert (pkg_args.end (), cas.begin (), cas.end ()); + pkg_args.push_back ("{"); - pkg_args.push_back ("}+"); + pkg_args.push_back ("--config-uuid"); + pkg_args.push_back (install_uuid); - pkg_args.push_back (pkg_rev); - } + // Note that we do another re-distribution (with a separate + // --checkout-root) in case the package is missing file that + // are only used during installation. + // + pkg_args.push_back ("--checkout-root"); + pkg_args.push_back (dist_install_root.string ()); - // Add the external build-time test packages. - // - if (has_buildtime_tests) - { - step_id s (step_id::bpkg_target_configure_build); - step_id f1 (step_id::b_configure); - step_id f2 (step_id::bpkg_configure_build); + pkg_args.insert (pkg_args.end (), eas.begin (), eas.end ()); + pkg_args.insert (pkg_args.end (), cas.begin (), cas.end ()); - cstrings eas (step_args (env_args, s, f1, f2)); - cstrings cas (step_args (config_args, s, f1, f2)); + pkg_args.push_back ("}+"); + + pkg_args.push_back (pkg_rev); + } - pkg_args.push_back ("{"); + // Add the build-time test packages. + // + if (has_buildtime_tests) + { + pkg_args.push_back ("{"); - pkg_args.push_back ("--config-uuid"); - pkg_args.push_back (target_uuid); + pkg_args.push_back ("--config-uuid"); + pkg_args.push_back (target_uuid); - pkg_args.push_back ("--checkout-root"); - pkg_args.push_back (dist_root.string ()); + pkg_args.push_back ("--checkout-root"); + pkg_args.push_back (dist_root.string ()); - if (bootstrap_import) - pkg_args.push_back (*bootstrap_import); + if (bootstrap_import) + pkg_args.push_back (*bootstrap_import); - pkg_args.insert (pkg_args.end (), eas.begin (), eas.end ()); - pkg_args.insert (pkg_args.end (), cas.begin (), cas.end ()); + pkg_args.insert (pkg_args.end (), eas.begin (), eas.end ()); + pkg_args.insert (pkg_args.end (), cas.begin (), cas.end ()); - pkg_args.push_back ("}+"); + pkg_args.push_back ("}+"); - // Add test dependency package constraints and group them if there - // are multiple of them. - // - if (buildtime_tests.size () != 1) - pkg_args.push_back ("{"); + // Add test dependency package constraints and group them if there + // are multiple of them. + // + if (buildtime_tests.size () != 1) + pkg_args.push_back ("{"); - // Strip the build-time mark. - // - for (auto t: buildtime_tests) - pkg_args.push_back (t.dependency::string ()); + // Strip the build-time mark. + // + for (auto t: buildtime_tests) + pkg_args.push_back (t.dependency::string ()); - if (buildtime_tests.size () != 1) - pkg_args.push_back ("}"); + if (buildtime_tests.size () != 1) + pkg_args.push_back ("}"); + } } } @@ -2326,9 +2324,7 @@ build (size_t argc, const char* argv[]) ? step_id::bpkg_test_separate_installed_update : step_id::bpkg_test_separate_update); - step_id s (installed - ? step_id::bpkg_test_separate_installed_update - : step_id::bpkg_test_separate_update); + step_id s (b); step_id f (step_id::bpkg_update); @@ -2360,9 +2356,7 @@ build (size_t argc, const char* argv[]) ? step_id::bpkg_test_separate_installed_test : step_id::bpkg_test_separate_test); - step_id s (installed - ? step_id::bpkg_test_separate_installed_test - : step_id::bpkg_test_separate_test); + step_id s (b); step_id f (step_id::bpkg_test); @@ -3034,11 +3028,8 @@ build (size_t argc, const char* argv[]) { pkg_args.push_back ("{"); - if (!conf_name.empty ()) - { - pkg_args.push_back ("--config-name"); - pkg_args.push_back (conf_name); - } + pkg_args.push_back ("--config-name"); + pkg_args.push_back (conf_name); pkg_args.push_back ("}+"); } diff --git a/tests/integration/testscript b/tests/integration/testscript index eef7981..21570bf 100644 --- a/tests/integration/testscript +++ b/tests/integration/testscript @@ -49,7 +49,7 @@ wait = 1 # Seconds. controller = --fake-request ../task --dump-result pkg = libhello -ver = 1.0.0+7 +ver = 1.0.0+8 #rep_url = "https://git.build2.org/hello/libhello.git#1.0" #rep_type = git rep_url = https://stage.build2.org/1 @@ -141,7 +141,7 @@ tests="tests: libxsd-tests == $ver" #\ pkg = xsd -ver = 4.2.0-b.1.20211014095925.62e38666e63f +ver = 4.2.0-b.2.20211026100043.e5d2958ee052 rep_url = "https://git.codesynthesis.com/xsd/xsd.git#master" rep_type = git #rep_url = https://queue.stage.build2.org/1 |