From 74eea8fe332c05774f108c5094eb335e58f44cfa Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 14 Oct 2022 13:43:32 +0300 Subject: Fix printing test id multiple times on test failure --- libbuild2/test/script/script.hxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libbuild2/test/script/script.hxx') diff --git a/libbuild2/test/script/script.hxx b/libbuild2/test/script/script.hxx index 319a9e2..3c2cbc4 100644 --- a/libbuild2/test/script/script.hxx +++ b/libbuild2/test/script/script.hxx @@ -96,6 +96,22 @@ namespace build2 scope_state state = scope_state::unknown; + // The command expression execution nesting level. Can be maintained + // by the runner to, for example, only perform some housekeeping on + // the topmost level (add the test id to the diagnostics, etc). + // + // Note that the command expression execution can be nested, so that + // the outer expression execution is not completed before all the + // inner expressions are executed. As for example in: + // + // echo 'a b' | for x + // echo 'c d' | for y + // test $x $y + // end + // end + // + size_t exec_level = 0; + // Test program paths. // // Currently always contains a single element (see test_program() for @@ -105,7 +121,7 @@ namespace build2 // small_vector test_programs; - void + virtual void set_variable (string name, names&&, const string& attrs, -- cgit v1.1