summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2016-12-06 10:53:59 -0500
committerMatt Clay <matt@mystile.com>2014-09-26 01:01:01 +0000
commit2fd5f7392354b2a66f61ebe34c70cd776ff2b6ac (patch)
tree2ded286264d8c50a4ee86d621056d8689b44b46b
parent46dad79394b62a6d30f6cfbb1e49bf5d2f5d349a (diff)
downloadansible-2fd5f7392354b2a66f61ebe34c70cd776ff2b6ac.tar.gz
Verify path before assigning to sanity test.
-rw-r--r--test/runner/lib/classification.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/runner/lib/classification.py b/test/runner/lib/classification.py
index b81f2e7566..3336434a44 100644
--- a/test/runner/lib/classification.py
+++ b/test/runner/lib/classification.py
@@ -9,6 +9,7 @@ from lib.target import (
walk_integration_targets,
walk_units_targets,
walk_compile_targets,
+ walk_sanity_targets,
)
from lib.util import (
@@ -76,10 +77,12 @@ class PathMapper(object):
self.module_targets = list(walk_module_targets())
self.compile_targets = list(walk_compile_targets())
self.units_targets = list(walk_units_targets())
+ self.sanity_targets = list(walk_sanity_targets())
self.compile_paths = set(t.path for t in self.compile_targets)
self.units_modules = set(t.module for t in self.units_targets if t.module)
self.units_paths = set(t.path for t in self.units_targets)
+ self.sanity_paths = set(t.path for t in self.sanity_targets)
self.module_names_by_path = dict((t.path, t.module) for t in self.module_targets)
self.integration_targets_by_name = dict((t.name, t) for t in self.integration_targets)
@@ -107,7 +110,7 @@ class PathMapper(object):
result['compile'] = path
# run sanity on path unless result specified otherwise
- if 'sanity' not in result:
+ if path in self.sanity_paths and 'sanity' not in result:
result['sanity'] = path
return result