From f41599c8e9435f3dfec60b872c2b4ae31177efdd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 10 Oct 2020 17:22:46 +0300 Subject: Add support for test timeouts --- libbuild2/rule.hxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libbuild2/rule.hxx') 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&) const = 0; + }; } #endif // LIBBUILD2_RULE_HXX -- cgit v1.1