diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-10-21 11:52:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 09:26:34 +0200 |
commit | 6cf30885f0d91da534871f2e6ddeca7a8a52b415 (patch) | |
tree | 75c2b28f1506e1025c9349b4a3f99e62ab6c41c0 /build2/test/script/runner | |
parent | 096b10b96162eca90958af42e24520e2bc728494 (diff) |
Pass command index, location to test runner
Diffstat (limited to 'build2/test/script/runner')
-rw-r--r-- | build2/test/script/runner | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/build2/test/script/runner b/build2/test/script/runner index 5581039..57e506f 100644 --- a/build2/test/script/runner +++ b/build2/test/script/runner @@ -8,6 +8,8 @@ #include <build2/types> #include <build2/utility> +#include <build2/diagnostics> // location + #include <build2/test/script/script> namespace build2 @@ -19,15 +21,24 @@ namespace build2 class runner { public: + + // Index is the 1-base index of this command in the command list + // (e.g., in a compound test). If it is 0 then it means there is only + // one command (e.g., a simple test). This information can be used, + // for example, to derive file names. + // + // Location is the start position of this command in the testscript. + // It can be used in diagnostics. + // virtual void - run (const command&) = 0; + run (const command&, size_t index, const location&) = 0; }; class concurrent_runner: public runner { public: virtual void - run (const command&) override; + run (const command&, size_t, const location&) override; }; } } |