From 64cbe53f7361075f841572854f1065a6f7c6507c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Oct 2016 17:41:09 +0200 Subject: Add testscript runner scope enter/leave callbacks --- build2/test/script/script | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'build2/test/script/script') diff --git a/build2/test/script/script b/build2/test/script/script index 7fbe949..3095ccf 100644 --- a/build2/test/script/script +++ b/build2/test/script/script @@ -119,9 +119,6 @@ namespace build2 const path& id_path; // Id path ($@, relative in POSIX form). const dir_path& wd_path; // Working dir ($~, absolute and normalized). - lines setup; - lines tdown; - // Variables. // public: @@ -155,6 +152,16 @@ namespace build2 protected: scope (const string& id, scope* parent); + + // Pre-parse data. + // + private: + friend class parser; + + location start_loc_; + lines setup_; + lines tdown_; + location end_loc_; }; class group: public scope @@ -172,10 +179,14 @@ namespace build2 class test: public scope { public: - lines tests; - - public: test (const string& id, group& p): scope (id, &p) {} + + // Pre-parse data. + // + private: + friend class parser; + + lines tests_; }; class script_base // Make sure certain things are initialized early. -- cgit v1.1