summaryrefslogtreecommitdiff
path: root/test/runner
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2017-07-29 08:11:00 -0700
committerToshio Kuratomi <a.badger@gmail.com>2017-07-29 14:13:30 -0700
commit21564cdb98cfc03f7feaec6ab0962333f7c078bb (patch)
treeac363f1ebc6ac98f942ee1a9e7437c4d6ef7b17c /test/runner
parent0765ceb66dfad116ec0519a0f9272158da6600d0 (diff)
downloadansible-21564cdb98cfc03f7feaec6ab0962333f7c078bb.tar.gz
Add some features to the pylint sanity check
* Enable specific tests (this lets us disable a group and then enable a particular test inside of it) * Comment out tests in the enable and disable files
Diffstat (limited to 'test/runner')
-rw-r--r--test/runner/lib/sanity.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/runner/lib/sanity.py b/test/runner/lib/sanity.py
index c3c32dd172..74faba7f26 100644
--- a/test/runner/lib/sanity.py
+++ b/test/runner/lib/sanity.py
@@ -451,7 +451,10 @@ def command_sanity_pylint(args, targets):
skip_paths = skip_fd.read().splitlines()
with open('test/sanity/pylint/disable.txt', 'r') as disable_fd:
- disable = set(disable_fd.read().splitlines())
+ disable = set(c for c in disable_fd.read().splitlines() if not c.strip().startswith('#'))
+
+ with open('test/sanity/pylint/enable.txt', 'r') as enable_fd:
+ enable = set(c for c in enable_fd.read().splitlines() if not c.strip().startswith('#'))
skip_paths_set = set(skip_paths)
@@ -469,6 +472,7 @@ def command_sanity_pylint(args, targets):
'--ignored-modules', '_MovedItems',
'--output-format', 'json',
'--disable', ','.join(sorted(disable)),
+ '--enable', ','.join(sorted(enable)),
] + paths
env = ansible_environment(args)