From e5827facbfbfe90eae1b71c355a08bf61e2f6e1a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 7 May 2020 22:30:17 +0300 Subject: Factor out generic script parsing/executing functionality from build2::test::script namespace --- libbuild2/test/script/runner.hxx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'libbuild2/test/script/runner.hxx') 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 #include +#include // exit + #include 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 { -- cgit v1.1