diff options
Diffstat (limited to 'libbuild2/test/script/runner.hxx')
-rw-r--r-- | libbuild2/test/script/runner.hxx | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/libbuild2/test/script/runner.hxx b/libbuild2/test/script/runner.hxx index 22cae4e..687d991 100644 --- a/libbuild2/test/script/runner.hxx +++ b/libbuild2/test/script/runner.hxx @@ -29,6 +29,12 @@ namespace build2 virtual bool test (scope&) const = 0; + // Return the runner program path and options if the test commands + // must be run via the runner and the pair of NULLs otherwise. + // + virtual pair<const process_path*, const strings*> + test_runner () = 0; + // Location is the scope start location (for diagnostics, etc). // virtual void @@ -42,14 +48,21 @@ namespace build2 // Location is the start position of this command line in the // testscript. It can be used in diagnostics. // + // Optionally, execute the specified function instead of the last + // pipe command. + // virtual void run (scope&, const command_expr&, command_type, - size_t index, + const iteration_index*, size_t index, + const function<command_function>&, const location&) = 0; virtual bool - run_if (scope&, const command_expr&, size_t, const location&) = 0; + run_cond (scope&, + const command_expr&, + const iteration_index*, size_t, + const location&) = 0; // Location is the scope end location (for diagnostics, etc). // @@ -66,17 +79,27 @@ namespace build2 virtual bool test (scope& s) const override; + // Return the test.runner.{path,options} values, if config.test.runner + // is specified. + // + virtual pair<const process_path*, const strings*> + test_runner () override; + virtual void enter (scope&, const location&) override; virtual void run (scope&, const command_expr&, command_type, - size_t, + const iteration_index*, size_t, + const function<command_function>&, const location&) override; virtual bool - run_if (scope&, const command_expr&, size_t, const location&) override; + run_cond (scope&, + const command_expr&, + const iteration_index*, size_t, + const location&) override; virtual void leave (scope&, const location&) override; |