From 2feda390b5372b06e786b96941d98267830e9de0 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 26 Apr 2019 11:33:14 -0700 Subject: [PATCH] Fix ansible-test target change classification. --- test/runner/lib/classification.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test/runner/lib/classification.py b/test/runner/lib/classification.py index 461f719961a..cc3405be6a3 100644 --- a/test/runner/lib/classification.py +++ b/test/runner/lib/classification.py @@ -631,17 +631,14 @@ class PathMapper(object): if not os.path.exists(path): return minimal - target = self.integration_targets_by_name[path.split('/')[3]] + target = self.integration_targets_by_name.get(path.split('/')[3]) + + if not target: + display.warning('Unexpected non-target found: %s' % path) + return minimal if 'hidden/' in target.aliases: - if target.type == 'role': - return minimal # already expanded using get_dependent_paths - - return { - 'integration': self.integration_all_target, - 'windows-integration': self.integration_all_target, - 'network-integration': self.integration_all_target, - } + return minimal # already expanded using get_dependent_paths return { 'integration': target.name if 'posix/' in target.aliases else None,