From b9c5147be264f30176a52ef5cff319a2c4843b2a Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 1 Feb 2018 09:52:31 -0800 Subject: [PATCH] Move import sanity test files into own directory. (#35593) --- test/runner/lib/sanity/import.py | 4 ++-- test/sanity/code-smell/no-underscore-variable.sh | 2 +- test/{runner => sanity/import}/importer.py | 2 +- test/{runner => sanity}/import/lib/ansible/__init__.py | 0 test/{runner => sanity}/import/lib/ansible/module_utils | 0 test/sanity/pylint/ignore.txt | 4 +++- 6 files changed, 7 insertions(+), 5 deletions(-) rename test/{runner => sanity/import}/importer.py (99%) rename test/{runner => sanity}/import/lib/ansible/__init__.py (100%) rename test/{runner => sanity}/import/lib/ansible/module_utils (100%) diff --git a/test/runner/lib/sanity/import.py b/test/runner/lib/sanity/import.py index fd5d41ded5..fbe83fb2a3 100644 --- a/test/runner/lib/sanity/import.py +++ b/test/runner/lib/sanity/import.py @@ -75,11 +75,11 @@ class ImportTest(SanityMultipleVersion): # add the importer to our virtual environment so it can be accessed through the coverage injector importer_path = os.path.join(virtual_environment_bin, 'importer.py') if not args.explain: - os.symlink(os.path.abspath('test/runner/importer.py'), importer_path) + os.symlink(os.path.abspath('test/sanity/import/importer.py'), importer_path) # activate the virtual environment env['PATH'] = '%s:%s' % (virtual_environment_bin, env['PATH']) - env['PYTHONPATH'] = os.path.abspath('test/runner/import/lib') + env['PYTHONPATH'] = os.path.abspath('test/sanity/import/lib') # make sure coverage is available in the virtual environment if needed if args.coverage: diff --git a/test/sanity/code-smell/no-underscore-variable.sh b/test/sanity/code-smell/no-underscore-variable.sh index c013c0a9a2..d058f46b33 100755 --- a/test/sanity/code-smell/no-underscore-variable.sh +++ b/test/sanity/code-smell/no-underscore-variable.sh @@ -101,7 +101,7 @@ TO_BE_FIXED=' ./lib/ansible/plugins/strategy/linear.py ./test/legacy/cleanup_gce.py ./test/legacy/gce_credentials.py -./test/runner/importer.py +./test/sanity/import/importer.py ./test/runner/lib/cloud/cs.py ./test/runner/lib/core_ci.py ./test/runner/lib/delegation.py diff --git a/test/runner/importer.py b/test/sanity/import/importer.py similarity index 99% rename from test/runner/importer.py rename to test/sanity/import/importer.py index 8554436d00..0c81eab42d 100755 --- a/test/runner/importer.py +++ b/test/sanity/import/importer.py @@ -41,7 +41,7 @@ def main(): for result in results: if result[0].startswith(base_dir): - source = result[0][len(base_dir) + 1:].replace('test/runner/import/', '') + source = result[0][len(base_dir) + 1:].replace('test/sanity/import/', '') line = result[1] or 0 break diff --git a/test/runner/import/lib/ansible/__init__.py b/test/sanity/import/lib/ansible/__init__.py similarity index 100% rename from test/runner/import/lib/ansible/__init__.py rename to test/sanity/import/lib/ansible/__init__.py diff --git a/test/runner/import/lib/ansible/module_utils b/test/sanity/import/lib/ansible/module_utils similarity index 100% rename from test/runner/import/lib/ansible/module_utils rename to test/sanity/import/lib/ansible/module_utils diff --git a/test/sanity/pylint/ignore.txt b/test/sanity/pylint/ignore.txt index 14d15e8254..d60e8ef8fe 100644 --- a/test/sanity/pylint/ignore.txt +++ b/test/sanity/pylint/ignore.txt @@ -69,7 +69,6 @@ lib/ansible/modules/storage/purestorage/purefa_pg.py ansible-format-automatic-sp lib/ansible/modules/system/firewalld.py ansible-format-automatic-specification lib/ansible/plugins/cliconf/junos.py ansible-no-format-on-bytestring 3 lib/ansible/plugins/cliconf/nxos.py ansible-format-automatic-specification -test/runner/importer.py missing-docstring 3.7 test/runner/injector/importer.py missing-docstring 3.7 test/runner/injector/injector.py missing-docstring 3.7 test/runner/lib/ansible_util.py missing-docstring 3.7 @@ -97,8 +96,10 @@ test/runner/lib/powershell_import_analysis.py missing-docstring 3.7 test/runner/lib/pytar.py missing-docstring 3.7 test/runner/lib/sanity/__init__.py missing-docstring 3.7 test/runner/lib/sanity/ansible_doc.py missing-docstring 3.7 +test/runner/lib/sanity/compile.py missing-docstring 3.7 test/runner/lib/sanity/import.py missing-docstring 3.7 test/runner/lib/sanity/pep8.py missing-docstring 3.7 +test/runner/lib/sanity/pslint.py missing-docstring 3.7 test/runner/lib/sanity/pylint.py missing-docstring 3.7 test/runner/lib/sanity/rstcheck.py missing-docstring 3.7 test/runner/lib/sanity/sanity_docs.py missing-docstring 3.7 @@ -113,3 +114,4 @@ test/runner/retry.py missing-docstring 3.7 test/runner/shippable.py missing-docstring 3.7 test/runner/test.py missing-docstring 3.7 test/runner/units/test_diff.py missing-docstring 3.7 +test/sanity/import/importer.py missing-docstring 3.7