diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-12-09 15:51:42 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-12-09 15:51:42 +0300 |
commit | 7d8fe34a06781153f42c533ae7e303b3c5daf575 (patch) | |
tree | f6cee5d1607297b67fcda450237b0f4b8610143d | |
parent | cf7196939af82155b329eddb7528cbbf9759b423 (diff) |
Add support for multiple requirements in requirement alternative
-rw-r--r-- | bbot/worker/worker.cxx | 8 | ||||
-rw-r--r-- | tests/integration/testscript | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index d6e8cad..e4b5e5e 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -1270,7 +1270,13 @@ build (size_t argc, const char* argv[]) tm.requirements.end (), [id] (const requirement_alternatives& r) { - return r.size () == 1 && r[0] == id; + if (r.size () == 1) + { + const requirement_alternative& a (r[0]); + return find (a.begin (), a.end (), id) != a.end (); + } + + return false; }) != tm.requirements.end (); }; diff --git a/tests/integration/testscript b/tests/integration/testscript index 21570bf..94a718d 100644 --- a/tests/integration/testscript +++ b/tests/integration/testscript @@ -116,7 +116,7 @@ rfp = yes #\ pkg = cli -ver = 1.2.0-b.7.20211014122150.388da73246c0 +ver = 1.2.0-b.8.20211123111254.927cc0443f6e rep_url = "https://git.codesynthesis.com/cli/cli.git#master" rep_type = git #rep_url = https://stage.build2.org/1 |