diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-09-20 23:00:27 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-09-28 17:59:43 +0300 |
commit | 744e8215261fbf81b9348d115d4916a9c88b52cc (patch) | |
tree | 9b78941d4ea67fefdccca98215b1340dd2dd6c99 /libbuild2/test/script/runner.cxx | |
parent | e59b4fc15eef3b3d0af5b81190b1e54f270ee2d2 (diff) |
Add support for 'while' loop in script
Diffstat (limited to 'libbuild2/test/script/runner.cxx')
-rw-r--r-- | libbuild2/test/script/runner.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libbuild2/test/script/runner.cxx b/libbuild2/test/script/runner.cxx index 8054c61..42eef04 100644 --- a/libbuild2/test/script/runner.cxx +++ b/libbuild2/test/script/runner.cxx @@ -142,7 +142,8 @@ namespace build2 void default_runner:: run (scope& sp, const command_expr& expr, command_type ct, - size_t li, const location& ll) + const iteration_index* ii, size_t li, + const location& ll) { // Noop for teardown commands if keeping tests output is requested. // @@ -175,13 +176,14 @@ namespace build2 dr << info << "test id: " << sp.id_path.posix_string (); }); - build2::script::run (sp, expr, li, ll); + build2::script::run (sp, expr, ii, li, ll); } bool default_runner:: - run_if (scope& sp, - const command_expr& expr, - size_t li, const location& ll) + run_cond (scope& sp, + const command_expr& expr, + const iteration_index* ii, size_t li, + const location& ll) { if (verb >= 3) text << ": ?" << expr; @@ -197,7 +199,7 @@ namespace build2 dr << info << "test id: " << sp.id_path.posix_string (); }); - return build2::script::run_if (sp, expr, li, ll); + return build2::script::run_cond (sp, expr, ii, li, ll); } } } |