summaryrefslogtreecommitdiffstats
path: root/test/sanity/code-smell/shebang.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-07-10 02:31:04 +0200
committerGitHub <noreply@github.com>2019-07-10 02:31:04 +0200
commit1e1463401de8ab93478149966a6da04a781f6c04 (patch)
tree48579c03b0b7a52750e7e0487424eb0b269e1318 /test/sanity/code-smell/shebang.py
parentFix Pacman regex for unmatched Arch package name (#48558) (diff)
downloadansible-1e1463401de8ab93478149966a6da04a781f6c04.tar.xz
ansible-1e1463401de8ab93478149966a6da04a781f6c04.zip
Prepare ansible-test for supporting collections. (#58886)
This is a small but incomplete set of the initial changes for supporting testing of collections with ansible-test.
Diffstat (limited to 'test/sanity/code-smell/shebang.py')
-rwxr-xr-xtest/sanity/code-smell/shebang.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/sanity/code-smell/shebang.py b/test/sanity/code-smell/shebang.py
index 0d50ff0fdc..04cfed8a39 100755
--- a/test/sanity/code-smell/shebang.py
+++ b/test/sanity/code-smell/shebang.py
@@ -74,6 +74,8 @@ def main():
is_module = False
is_integration = False
+ dirname = os.path.dirname(path)
+
if path.startswith('lib/ansible/modules/'):
is_module = True
elif path.startswith('lib/') or path.startswith('test/runner/lib/'):
@@ -87,14 +89,14 @@ def main():
elif path.startswith('test/integration/targets/'):
is_integration = True
- dirname = os.path.dirname(path)
-
if dirname.endswith('/library') or dirname.endswith('/plugins/modules') or dirname in (
# non-standard module library directories
'test/integration/targets/module_precedence/lib_no_extension',
'test/integration/targets/module_precedence/lib_with_extension',
):
is_module = True
+ elif dirname == 'plugins/modules':
+ is_module = True
if is_module:
if executable: