Skip to content

Commit

Permalink
Verify path before assigning to sanity test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattclay committed Dec 8, 2016
1 parent ab43a26 commit 7d3e2b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/runner/lib/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
walk_integration_targets,
walk_units_targets,
walk_compile_targets,
walk_sanity_targets,
)

from lib.util import (
Expand Down Expand Up @@ -76,10 +77,12 @@ def __init__(self):
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)
Expand Down Expand Up @@ -107,7 +110,7 @@ def classify(self, path):
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
Expand Down

0 comments on commit 7d3e2b2

Please sign in to comment.