aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/runner.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-07 22:30:17 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:35:29 +0200
commitd85461c4280e292994412056216daf5f82fdd6e9 (patch)
tree16115d669f55b0bcce00425d7f81c970b774b6c5 /libbuild2/test/script/runner.hxx
parent98db2c71fa8175c1680ab2c6cca07c4c00853047 (diff)
Factor out generic script parsing/executing functionality from build2::test::script namespace
Diffstat (limited to 'libbuild2/test/script/runner.hxx')
-rw-r--r--libbuild2/test/script/runner.hxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/libbuild2/test/script/runner.hxx b/libbuild2/test/script/runner.hxx
index af37f56..22cae4e 100644
--- a/libbuild2/test/script/runner.hxx
+++ b/libbuild2/test/script/runner.hxx
@@ -7,6 +7,8 @@
#include <libbuild2/types.hxx>
#include <libbuild2/utility.hxx>
+#include <libbuild2/script/run.hxx> // exit
+
#include <libbuild2/test/script/script.hxx>
namespace build2
@@ -17,18 +19,7 @@ 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) {}
- };
+ using exit_scope = build2::script::exit;
class runner
{