aboutsummaryrefslogtreecommitdiff
path: root/build2/test/script/runner
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-11 10:14:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-01-12 10:58:19 +0200
commit9bf93c1ab73ee3cd2b763285fc5fc5456e972854 (patch)
tree0357c36e12fe2137ef6c9bd228e9d69bb2489a02 /build2/test/script/runner
parent33ed305eac57bff406fa3f672ba8acc4941e8f13 (diff)
Implement support for narrowing down tests (config.test)
Diffstat (limited to 'build2/test/script/runner')
-rw-r--r--build2/test/script/runner16
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_;
};
}
}