Relocate the AZP entry point scripts (#80114)

Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
pull/80115/head
Matt Clay 2 years ago committed by GitHub
parent b981a9dfcd
commit f47bc03599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,7 @@ variables:
- name: coverageBranches - name: coverageBranches
value: devel value: devel
- name: entryPoint - name: entryPoint
value: test/utils/shippable/shippable.sh value: .azure-pipelines/commands/entry-point.sh
- name: fetchDepth - name: fetchDepth
value: 500 value: 500

@ -59,4 +59,4 @@ fi
ansible-test env --dump --show --timeout "${timeout}" --color -v ansible-test env --dump --show --timeout "${timeout}" --color -v
"test/utils/shippable/${script}.sh" "${test}" ".azure-pipelines/commands/${script}.sh" "${test}"

@ -11,4 +11,4 @@ script="${args[1]}"
IFS='/' test="${args[*]:1}" IFS='/' test="${args[*]:1}"
"test/utils/shippable/incidental/${script}.sh" "${test}" ".azure-pipelines/commands/incidental/${script}.sh" "${test}"

@ -662,21 +662,54 @@ class PathMapper:
def _classify_ansible(self, path: str) -> t.Optional[dict[str, str]]: def _classify_ansible(self, path: str) -> t.Optional[dict[str, str]]:
"""Return the classification for the given path using rules specific to Ansible.""" """Return the classification for the given path using rules specific to Ansible."""
dirname = os.path.dirname(path)
filename = os.path.basename(path)
name, ext = os.path.splitext(filename)
minimal: dict[str, str] = {}
# Early classification that needs to occur before common classification belongs here.
if path.startswith('test/units/compat/'): if path.startswith('test/units/compat/'):
return { return {
'units': 'test/units/', 'units': 'test/units/',
} }
if dirname == '.azure-pipelines/commands':
test_map = {
'cloud.sh': 'integration:cloud/',
'linux.sh': 'integration:all',
'network.sh': 'network-integration:all',
'remote.sh': 'integration:all',
'sanity.sh': 'sanity:all',
'units.sh': 'units:all',
'windows.sh': 'windows-integration:all',
}
test_match = test_map.get(filename)
if test_match:
test_command, test_target = test_match.split(':')
return {
test_command: test_target,
}
cloud_target = f'cloud/{name}/'
if cloud_target in self.integration_targets_by_alias:
return {
'integration': cloud_target,
}
# Classification common to both ansible and collections.
result = self._classify_common(path) result = self._classify_common(path)
if result is not None: if result is not None:
return result return result
dirname = os.path.dirname(path) # Classification here is specific to ansible, and runs after common classification.
filename = os.path.basename(path)
name, ext = os.path.splitext(filename)
minimal: dict[str, str] = {}
if path.startswith('bin/'): if path.startswith('bin/'):
return all_tests(self.args) # broad impact, run all tests return all_tests(self.args) # broad impact, run all tests
@ -792,39 +825,6 @@ class PathMapper:
if path.startswith('test/support/'): if path.startswith('test/support/'):
return all_tests(self.args) # test infrastructure, run all tests return all_tests(self.args) # test infrastructure, run all tests
if path.startswith('test/utils/shippable/'):
if dirname == 'test/utils/shippable':
test_map = {
'cloud.sh': 'integration:cloud/',
'linux.sh': 'integration:all',
'network.sh': 'network-integration:all',
'remote.sh': 'integration:all',
'sanity.sh': 'sanity:all',
'units.sh': 'units:all',
'windows.sh': 'windows-integration:all',
}
test_match = test_map.get(filename)
if test_match:
test_command, test_target = test_match.split(':')
return {
test_command: test_target,
}
cloud_target = 'cloud/%s/' % name
if cloud_target in self.integration_targets_by_alias:
return {
'integration': cloud_target,
}
return all_tests(self.args) # test infrastructure, run all tests
if path.startswith('test/utils/'):
return minimal
if '/' not in path: if '/' not in path:
if path in ( if path in (
'.gitattributes', '.gitattributes',

@ -29,9 +29,6 @@ def assemble_files_to_ship(complete_file_list):
'hacking/ticket_stubs/*', 'hacking/ticket_stubs/*',
'test/sanity/code-smell/botmeta.*', 'test/sanity/code-smell/botmeta.*',
'test/sanity/code-smell/release-names.*', 'test/sanity/code-smell/release-names.*',
'test/utils/*',
'test/utils/*/*',
'test/utils/*/*/*',
'test/results/.tmp/*', 'test/results/.tmp/*',
'test/results/.tmp/*/*', 'test/results/.tmp/*/*',
'test/results/.tmp/*/*/*', 'test/results/.tmp/*/*/*',

Loading…
Cancel
Save