aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/runner.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-06-16 23:43:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-06-19 12:57:24 +0300
commit062e03325cf9bb7fecfb9ea254ceb5c0cf427a7a (patch)
treec9e29b96a4ae919dcd99541d38e191c7fe20c7b1 /build2/test/script/runner.hxx
parent4c2243f8c790207c0ee4119fcb081b69f06f476e (diff)
Add support for exit testscript builtin
Diffstat (limited to 'build2/test/script/runner.hxx')
-rw-r--r--build2/test/script/runner.hxx13
1 files changed, 13 insertions, 0 deletions
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: