From 062e03325cf9bb7fecfb9ea254ceb5c0cf427a7a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 16 Jun 2017 23:43:24 +0300 Subject: Add support for exit testscript builtin --- build2/test/script/runner.hxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'build2/test/script/runner.hxx') diff --git a/build2/test/script/runner.hxx b/build2/test/script/runner.hxx index 7833692..84487d0 100644 --- a/build2/test/script/runner.hxx +++ b/build2/test/script/runner.hxx @@ -20,6 +20,19 @@ namespace build2 namespace script { + // An exception that can be thrown by a runner to exit the scope (for + // example, as a result of executing the exit builtin). The status + // indicates whether the scope should be considered to have succeeded + // or failed. + // + struct exit_scope + { + bool status; + + explicit + exit_scope (bool s): status (s) {} + }; + class runner { public: -- cgit v1.1