mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
runtests.py: Fix IndexError in --from-filenames
This commit is contained in:
parent
25097f9933
commit
85612cfc8f
1 changed files with 8 additions and 3 deletions
|
@ -424,9 +424,14 @@ class SaltTestingParser(optparse.OptionParser):
|
|||
# State matches for execution modules of the same name
|
||||
# (e.g. unit.states.test_archive if
|
||||
# unit.modules.test_archive is being run)
|
||||
if comps[-2] == 'modules':
|
||||
comps[-2] = 'states'
|
||||
_add(comps)
|
||||
try:
|
||||
if comps[-2] == 'modules':
|
||||
comps[-2] = 'states'
|
||||
_add(comps)
|
||||
except IndexError:
|
||||
# Not an execution module. This is either directly in
|
||||
# the salt/ directory, or salt/something/__init__.py
|
||||
pass
|
||||
|
||||
# Make sure to run a test module if it's been modified
|
||||
elif match.group(1).startswith('tests/'):
|
||||
|
|
Loading…
Add table
Reference in a new issue