From bfda43e857ab964dc4bc5a5d308bfacb8ed81afe Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Mon, 25 Jan 2021 22:33:33 +0100 Subject: [PATCH] Skip test cases recursively in case of dangling dependencies --- reframe/frontend/dependencies.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/reframe/frontend/dependencies.py b/reframe/frontend/dependencies.py index b1ce856068..fc7f645865 100644 --- a/reframe/frontend/dependencies.py +++ b/reframe/frontend/dependencies.py @@ -61,7 +61,6 @@ def resolve_dep(src, dst): # c stands for check or case depending on the context # p stands for partition # e stands for environment - # t stands for target # We use an ordered dict here, because we need to keep the order of # partitions and environments @@ -79,8 +78,23 @@ def resolve_dep(src, dst): if when((psrc, esrc), (pdst, edst)): c.deps.append(d) except DependencyError as e: - getlogger().warning(f'{e}; skipping test case...') - skipped_cases.append(c) + getlogger().warning(f'{e}; skipping dependent test cases:') + + # FIXME: we need to unit test this properly + skip_nodes = {c} + while skip_nodes: + v = skip_nodes.pop() + skipped_cases.append(v) + getlogger().warning(f' - {v}') + pruned_nodes = [] + for u, adj in graph.items(): + if v in adj: + skip_nodes.add(u) + pruned_nodes.append(u) + + for u in pruned_nodes: + del graph[u] + continue graph[c] = util.OrderedSet(c.deps)