summaryrefslogtreecommitdiff
path: root/test/sanity
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2021-10-19 14:24:57 -0500
committerGitHub <noreply@github.com>2021-10-19 14:24:57 -0500
commit66a83314b9d30c6a139de960e6da8d5554c28544 (patch)
tree88b110f697b43addcbe82de8d1a824467130ac50 /test/sanity
parent43d09710c81f36113fec8d68e650a6b6d82dca05 (diff)
downloadansible-66a83314b9d30c6a139de960e6da8d5554c28544.tar.gz
Modernize install (#76021)
Co-authored-by: Matt Clay <matt@mystile.com> Co-authored-by: Matt Davis <mrd@redhat.com> Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Diffstat (limited to 'test/sanity')
-rw-r--r--test/sanity/code-smell/package-data.py34
-rw-r--r--test/sanity/ignore.txt6
2 files changed, 26 insertions, 14 deletions
diff --git a/test/sanity/code-smell/package-data.py b/test/sanity/code-smell/package-data.py
index 921cb1971f..9c64ac6fd2 100644
--- a/test/sanity/code-smell/package-data.py
+++ b/test/sanity/code-smell/package-data.py
@@ -29,6 +29,7 @@ def assemble_files_to_ship(complete_file_list):
'hacking/tests/*',
'hacking/ticket_stubs/*',
'test/sanity/code-smell/botmeta.*',
+ 'test/sanity/code-smell/release-names.*',
'test/utils/*',
'test/utils/*/*',
'test/utils/*/*/*',
@@ -53,8 +54,9 @@ def assemble_files_to_ship(complete_file_list):
'hacking/report.py',
'hacking/return_skeleton_generator.py',
'hacking/test-module',
- 'hacking/test-module.py',
'test/support/README.md',
+ 'test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py',
+ 'test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py',
'.cherry_picker.toml',
'.mailmap',
# Generated as part of a build step
@@ -74,22 +76,27 @@ def assemble_files_to_ship(complete_file_list):
'hacking/env-setup',
'hacking/env-setup.fish',
'MANIFEST',
+ 'setup.cfg',
+ # docs for test files not included in sdist
+ 'docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst',
+ 'docs/docsite/rst/dev_guide/testing/sanity/botmeta.rst',
+ 'docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst',
+ 'docs/docsite/rst/dev_guide/testing/sanity/release-names.rst',
))
# These files are generated and then intentionally added to the sdist
# Manpages
+ ignore_script = ('ansible-connection', 'ansible-test')
manpages = ['docs/man/man1/ansible.1']
for dirname, dummy, files in os.walk('bin'):
for filename in files:
- path = os.path.join(dirname, filename)
- if os.path.islink(path):
- if os.readlink(path) == 'ansible':
- manpages.append('docs/man/man1/%s.1' % filename)
+ if filename in ignore_script:
+ continue
+ manpages.append('docs/man/man1/%s.1' % filename)
# Misc
misc_generated_files = [
- 'SYMLINK_CACHE.json',
'PKG-INFO',
]
@@ -110,7 +117,11 @@ def assemble_files_to_install(complete_file_list):
"""
This looks for all of the files which should show up in an installation of ansible
"""
- ignore_patterns = tuple()
+ ignore_patterns = (
+ # Tests excluded from sdist
+ 'test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py',
+ 'test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py',
+ )
pkg_data_files = []
for path in complete_file_list:
@@ -256,12 +267,19 @@ def check_sdist_files_are_wanted(sdist_dir, to_ship_files):
dirname = ''
for filename in files:
+ if filename == 'setup.cfg':
+ continue
+
path = os.path.join(dirname, filename)
if path not in to_ship_files:
+
if fnmatch.fnmatch(path, 'changelogs/CHANGELOG-v2.[0-9]*.rst'):
# changelog files are expected
continue
+ if fnmatch.fnmatch(path, 'lib/ansible_core.egg-info/*'):
+ continue
+
# FIXME: ansible-test doesn't pass the paths of symlinks to us so we aren't
# checking those
if not os.path.islink(os.path.join(sdist_dir, path)):
@@ -282,7 +300,7 @@ def check_installed_contains_expected(install_dir, to_install_files):
EGG_RE = re.compile('ansible[^/]+\\.egg-info/(PKG-INFO|SOURCES.txt|'
- 'dependency_links.txt|not-zip-safe|requires.txt|top_level.txt)$')
+ 'dependency_links.txt|not-zip-safe|requires.txt|top_level.txt|entry_points.txt)$')
def check_installed_files_are_wanted(install_dir, to_install_files):
diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt
index 07e2e15b20..b4459b4b78 100644
--- a/test/sanity/ignore.txt
+++ b/test/sanity/ignore.txt
@@ -1,14 +1,8 @@
docs/docsite/rst/dev_guide/testing/sanity/no-smart-quotes.rst no-smart-quotes
docs/docsite/rst/locales/ja/LC_MESSAGES/dev_guide.po no-smart-quotes # Translation of the no-smart-quotes rule
-examples/play.yml shebang
examples/scripts/ConfigureRemotingForAnsible.ps1 pslint:PSCustomUseLiteralPath
-examples/scripts/my_test_facts.py shebang # example module but not in a normal module location
-examples/scripts/my_test_info.py shebang # example module but not in a normal module location
-examples/scripts/my_test.py shebang # example module but not in a normal module location
examples/scripts/upgrade_to_ps3.ps1 pslint:PSCustomUseLiteralPath
examples/scripts/upgrade_to_ps3.ps1 pslint:PSUseApprovedVerbs
-lib/ansible/cli/console.py pylint:disallowed-name
-lib/ansible/cli/scripts/ansible_cli_stub.py shebang
lib/ansible/cli/scripts/ansible_connection_cli_stub.py shebang
lib/ansible/config/base.yml no-unwanted-files
lib/ansible/executor/playbook_executor.py pylint:disallowed-name