aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script/parser.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-10-10 17:22:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-11-06 19:32:09 +0300
commitf41599c8e9435f3dfec60b872c2b4ae31177efdd (patch)
tree088f8d9bf906e4a2ed734e034699163c9ccc7306 /libbuild2/script/parser.hxx
parentac76a4fd2afff48a0d5db84592babe5cabef3a2c (diff)
Add support for test timeouts
Diffstat (limited to 'libbuild2/script/parser.hxx')
-rw-r--r--libbuild2/script/parser.hxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/libbuild2/script/parser.hxx b/libbuild2/script/parser.hxx
index da69591..9098b3c 100644
--- a/libbuild2/script/parser.hxx
+++ b/libbuild2/script/parser.hxx
@@ -130,12 +130,18 @@ namespace build2
pre_parse_line_start (token&, token_type&, lexer_mode);
// Parse the env pseudo-builtin arguments up to the program name. Return
- // the list of the variables that should be unset ("name") and/or set
- // ("name=value") in the command environment and the token/type that
- // starts the program name. Note that the variable unsets come first, if
- // present.
+ // the program execution timeout, the list of the variables that should
+ // be unset ("name") and/or set ("name=value") in the command
+ // environment, and the token/type that starts the program name. Note
+ // that the variable unsets come first, if present.
//
- environment_vars
+ struct parsed_env
+ {
+ optional<duration> timeout;
+ environment_vars variables;
+ };
+
+ parsed_env
parse_env_builtin (token&, token_type&);
// Execute.