mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
This commit is contained in:
@@ -27,7 +27,7 @@ variables:
|
||||
- name: coverageBranches
|
||||
value: devel
|
||||
- name: entryPoint
|
||||
value: test/utils/shippable/shippable.sh
|
||||
value: .azure-pipelines/commands/entry-point.sh
|
||||
- name: fetchDepth
|
||||
value: 500
|
||||
|
||||
|
||||
@@ -59,4 +59,4 @@ fi
|
||||
|
||||
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}"
|
||||
|
||||
"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]]:
|
||||
"""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/'):
|
||||
return {
|
||||
'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)
|
||||
|
||||
if result is not None:
|
||||
return result
|
||||
|
||||
dirname = os.path.dirname(path)
|
||||
filename = os.path.basename(path)
|
||||
name, ext = os.path.splitext(filename)
|
||||
|
||||
minimal: dict[str, str] = {}
|
||||
# Classification here is specific to ansible, and runs after common classification.
|
||||
|
||||
if path.startswith('bin/'):
|
||||
return all_tests(self.args) # broad impact, run all tests
|
||||
@@ -792,39 +825,6 @@ class PathMapper:
|
||||
if path.startswith('test/support/'):
|
||||
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 path in (
|
||||
'.gitattributes',
|
||||
|
||||
@@ -29,9 +29,6 @@ def assemble_files_to_ship(complete_file_list):
|
||||
'hacking/ticket_stubs/*',
|
||||
'test/sanity/code-smell/botmeta.*',
|
||||
'test/sanity/code-smell/release-names.*',
|
||||
'test/utils/*',
|
||||
'test/utils/*/*',
|
||||
'test/utils/*/*/*',
|
||||
'test/results/.tmp/*',
|
||||
'test/results/.tmp/*/*',
|
||||
'test/results/.tmp/*/*/*',
|
||||
|
||||
Reference in New Issue
Block a user