diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-11 10:14:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-01-12 10:58:19 +0200 |
commit | 9bf93c1ab73ee3cd2b763285fc5fc5456e972854 (patch) | |
tree | 0357c36e12fe2137ef6c9bd228e9d69bb2489a02 /build2/test/script/runner | |
parent | 33ed305eac57bff406fa3f672ba8acc4941e8f13 (diff) |
Implement support for narrowing down tests (config.test)
Diffstat (limited to 'build2/test/script/runner')
-rw-r--r-- | build2/test/script/runner | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/build2/test/script/runner b/build2/test/script/runner index 5e05255..7b932b9 100644 --- a/build2/test/script/runner +++ b/build2/test/script/runner @@ -16,11 +16,18 @@ namespace build2 { namespace test { + class common; + namespace script { class runner { public: + // Return false if this test/group should be skipped. + // + virtual bool + test (scope&) const = 0; + // Location is the scope start location (for diagnostics, etc). // virtual void @@ -49,6 +56,12 @@ namespace build2 class default_runner: public runner { public: + explicit + default_runner (const common& c): common_ (c) {} + + virtual bool + test (scope& s) const override; + virtual void enter (scope&, const location&) override; @@ -60,6 +73,9 @@ namespace build2 virtual void leave (scope&, const location&) override; + + private: + const common& common_; }; } } |