diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-10-10 17:22:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-11-06 19:32:09 +0300 |
commit | f41599c8e9435f3dfec60b872c2b4ae31177efdd (patch) | |
tree | 088f8d9bf906e4a2ed734e034699163c9ccc7306 /libbuild2/rule.hxx | |
parent | ac76a4fd2afff48a0d5db84592babe5cabef3a2c (diff) |
Add support for test timeouts
Diffstat (limited to 'libbuild2/rule.hxx')
-rw-r--r-- | libbuild2/rule.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libbuild2/rule.hxx b/libbuild2/rule.hxx index fa61bc5..8796659 100644 --- a/libbuild2/rule.hxx +++ b/libbuild2/rule.hxx @@ -205,6 +205,22 @@ namespace build2 static target_state clean_recipes_build (action, const scope&, const dir&); }; + + // A mix-in interface for ad hoc rules that support recipes with deadlines. + // + class adhoc_rule_with_deadline + { + public: + virtual + ~adhoc_rule_with_deadline (); + + // Return empty recipe if one with the deadline cannot be provided for + // this action. In this case the caller may fallback to the normal + // apply(). + // + virtual recipe + apply (action, target&, match_extra&, const optional<timestamp>&) const = 0; + }; } #endif // LIBBUILD2_RULE_HXX |