aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/runner.hxx
diff options
context:
space:
mode:
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: