summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-02-28 13:21:11 -0800
committerMatt Clay <matt@mystile.com>2023-03-14 17:52:30 -0700
commit4276f9c35252182b51b8badfe185d916554402ab (patch)
tree8d12d5763aa7dd286247ea285b224cbd810978ce
parent106257520654759c8f2970079b29857f526ba112 (diff)
downloadansible-4276f9c35252182b51b8badfe185d916554402ab.tar.gz
[stable-2.12] Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.. (cherry picked from commit f47bc03599eedc48753d2cd5e1bea177f35e6133) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--.azure-pipelines/azure-pipelines.yml2
l---------.azure-pipelines/commands/alpine.sh (renamed from test/utils/shippable/alpine.sh)0
-rwxr-xr-x.azure-pipelines/commands/cloud.sh (renamed from test/utils/shippable/cloud.sh)0
-rwxr-xr-x.azure-pipelines/commands/entry-point.sh (renamed from test/utils/shippable/shippable.sh)2
l---------.azure-pipelines/commands/fedora.sh (renamed from test/utils/shippable/fedora.sh)0
l---------.azure-pipelines/commands/freebsd.sh (renamed from test/utils/shippable/freebsd.sh)0
l---------.azure-pipelines/commands/galaxy.sh (renamed from test/utils/shippable/galaxy.sh)0
-rwxr-xr-x.azure-pipelines/commands/generic.sh (renamed from test/utils/shippable/generic.sh)0
-rwxr-xr-x.azure-pipelines/commands/i.sh (renamed from test/utils/shippable/i.sh)2
l---------.azure-pipelines/commands/incidental/aws.sh (renamed from test/utils/shippable/incidental/aws.sh)0
-rwxr-xr-x.azure-pipelines/commands/incidental/cloud.sh (renamed from test/utils/shippable/incidental/cloud.sh)0
l---------.azure-pipelines/commands/incidental/freebsd.sh (renamed from test/utils/shippable/incidental/freebsd.sh)0
l---------.azure-pipelines/commands/incidental/ios.sh (renamed from test/utils/shippable/incidental/ios.sh)0
-rwxr-xr-x.azure-pipelines/commands/incidental/linux.sh (renamed from test/utils/shippable/incidental/linux.sh)0
l---------.azure-pipelines/commands/incidental/macos.sh (renamed from test/utils/shippable/incidental/macos.sh)0
-rwxr-xr-x.azure-pipelines/commands/incidental/network.sh (renamed from test/utils/shippable/incidental/network.sh)0
-rwxr-xr-x.azure-pipelines/commands/incidental/remote.sh (renamed from test/utils/shippable/incidental/remote.sh)0
l---------.azure-pipelines/commands/incidental/rhel.sh (renamed from test/utils/shippable/incidental/rhel.sh)0
l---------.azure-pipelines/commands/incidental/vyos.sh (renamed from test/utils/shippable/incidental/vyos.sh)0
-rwxr-xr-x.azure-pipelines/commands/incidental/windows.sh (renamed from test/utils/shippable/incidental/windows.sh)0
-rwxr-xr-x.azure-pipelines/commands/linux.sh (renamed from test/utils/shippable/linux.sh)0
l---------.azure-pipelines/commands/macos.sh (renamed from test/utils/shippable/macos.sh)0
-rwxr-xr-x.azure-pipelines/commands/remote.sh (renamed from test/utils/shippable/remote.sh)0
l---------.azure-pipelines/commands/rhel.sh (renamed from test/utils/shippable/rhel.sh)0
-rwxr-xr-x.azure-pipelines/commands/sanity.sh (renamed from test/utils/shippable/sanity.sh)0
l---------.azure-pipelines/commands/ubuntu.sh (renamed from test/utils/shippable/ubuntu.sh)0
-rwxr-xr-x.azure-pipelines/commands/units.sh (renamed from test/utils/shippable/units.sh)0
-rwxr-xr-x.azure-pipelines/commands/windows.sh (renamed from test/utils/shippable/windows.sh)0
-rw-r--r--test/lib/ansible_test/_internal/classification/__init__.py76
-rw-r--r--test/sanity/code-smell/package-data.py3
30 files changed, 41 insertions, 44 deletions
diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml
index 5e961011ee..472f42eda9 100644
--- a/.azure-pipelines/azure-pipelines.yml
+++ b/.azure-pipelines/azure-pipelines.yml
@@ -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
diff --git a/test/utils/shippable/alpine.sh b/.azure-pipelines/commands/alpine.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/alpine.sh
+++ b/.azure-pipelines/commands/alpine.sh
diff --git a/test/utils/shippable/cloud.sh b/.azure-pipelines/commands/cloud.sh
index da037e09e1..da037e09e1 100755
--- a/test/utils/shippable/cloud.sh
+++ b/.azure-pipelines/commands/cloud.sh
diff --git a/test/utils/shippable/shippable.sh b/.azure-pipelines/commands/entry-point.sh
index 8fa12482f2..0a9e571be1 100755
--- a/test/utils/shippable/shippable.sh
+++ b/.azure-pipelines/commands/entry-point.sh
@@ -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}"
diff --git a/test/utils/shippable/fedora.sh b/.azure-pipelines/commands/fedora.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/fedora.sh
+++ b/.azure-pipelines/commands/fedora.sh
diff --git a/test/utils/shippable/freebsd.sh b/.azure-pipelines/commands/freebsd.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/freebsd.sh
+++ b/.azure-pipelines/commands/freebsd.sh
diff --git a/test/utils/shippable/galaxy.sh b/.azure-pipelines/commands/galaxy.sh
index 700ad3edcf..700ad3edcf 120000
--- a/test/utils/shippable/galaxy.sh
+++ b/.azure-pipelines/commands/galaxy.sh
diff --git a/test/utils/shippable/generic.sh b/.azure-pipelines/commands/generic.sh
index 367f98191f..367f98191f 100755
--- a/test/utils/shippable/generic.sh
+++ b/.azure-pipelines/commands/generic.sh
diff --git a/test/utils/shippable/i.sh b/.azure-pipelines/commands/i.sh
index efa2866d2e..2b3eed038b 100755
--- a/test/utils/shippable/i.sh
+++ b/.azure-pipelines/commands/i.sh
@@ -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}"
diff --git a/test/utils/shippable/incidental/aws.sh b/.azure-pipelines/commands/incidental/aws.sh
index 700ad3edcf..700ad3edcf 120000
--- a/test/utils/shippable/incidental/aws.sh
+++ b/.azure-pipelines/commands/incidental/aws.sh
diff --git a/test/utils/shippable/incidental/cloud.sh b/.azure-pipelines/commands/incidental/cloud.sh
index ad20edd361..ad20edd361 100755
--- a/test/utils/shippable/incidental/cloud.sh
+++ b/.azure-pipelines/commands/incidental/cloud.sh
diff --git a/test/utils/shippable/incidental/freebsd.sh b/.azure-pipelines/commands/incidental/freebsd.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/incidental/freebsd.sh
+++ b/.azure-pipelines/commands/incidental/freebsd.sh
diff --git a/test/utils/shippable/incidental/ios.sh b/.azure-pipelines/commands/incidental/ios.sh
index cad3e41b70..cad3e41b70 120000
--- a/test/utils/shippable/incidental/ios.sh
+++ b/.azure-pipelines/commands/incidental/ios.sh
diff --git a/test/utils/shippable/incidental/linux.sh b/.azure-pipelines/commands/incidental/linux.sh
index 2f513dd252..2f513dd252 100755
--- a/test/utils/shippable/incidental/linux.sh
+++ b/.azure-pipelines/commands/incidental/linux.sh
diff --git a/test/utils/shippable/incidental/macos.sh b/.azure-pipelines/commands/incidental/macos.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/incidental/macos.sh
+++ b/.azure-pipelines/commands/incidental/macos.sh
diff --git a/test/utils/shippable/incidental/network.sh b/.azure-pipelines/commands/incidental/network.sh
index 1c489f9e31..1c489f9e31 100755
--- a/test/utils/shippable/incidental/network.sh
+++ b/.azure-pipelines/commands/incidental/network.sh
diff --git a/test/utils/shippable/incidental/remote.sh b/.azure-pipelines/commands/incidental/remote.sh
index 95f304d54a..95f304d54a 100755
--- a/test/utils/shippable/incidental/remote.sh
+++ b/.azure-pipelines/commands/incidental/remote.sh
diff --git a/test/utils/shippable/incidental/rhel.sh b/.azure-pipelines/commands/incidental/rhel.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/incidental/rhel.sh
+++ b/.azure-pipelines/commands/incidental/rhel.sh
diff --git a/test/utils/shippable/incidental/vyos.sh b/.azure-pipelines/commands/incidental/vyos.sh
index cad3e41b70..cad3e41b70 120000
--- a/test/utils/shippable/incidental/vyos.sh
+++ b/.azure-pipelines/commands/incidental/vyos.sh
diff --git a/test/utils/shippable/incidental/windows.sh b/.azure-pipelines/commands/incidental/windows.sh
index 2eaed29801..2eaed29801 100755
--- a/test/utils/shippable/incidental/windows.sh
+++ b/.azure-pipelines/commands/incidental/windows.sh
diff --git a/test/utils/shippable/linux.sh b/.azure-pipelines/commands/linux.sh
index 9cc2f966cb..9cc2f966cb 100755
--- a/test/utils/shippable/linux.sh
+++ b/.azure-pipelines/commands/linux.sh
diff --git a/test/utils/shippable/macos.sh b/.azure-pipelines/commands/macos.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/macos.sh
+++ b/.azure-pipelines/commands/macos.sh
diff --git a/test/utils/shippable/remote.sh b/.azure-pipelines/commands/remote.sh
index b64e0d46fc..b64e0d46fc 100755
--- a/test/utils/shippable/remote.sh
+++ b/.azure-pipelines/commands/remote.sh
diff --git a/test/utils/shippable/rhel.sh b/.azure-pipelines/commands/rhel.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/rhel.sh
+++ b/.azure-pipelines/commands/rhel.sh
diff --git a/test/utils/shippable/sanity.sh b/.azure-pipelines/commands/sanity.sh
index 6dc4d1da9a..6dc4d1da9a 100755
--- a/test/utils/shippable/sanity.sh
+++ b/.azure-pipelines/commands/sanity.sh
diff --git a/test/utils/shippable/ubuntu.sh b/.azure-pipelines/commands/ubuntu.sh
index 6ddb776854..6ddb776854 120000
--- a/test/utils/shippable/ubuntu.sh
+++ b/.azure-pipelines/commands/ubuntu.sh
diff --git a/test/utils/shippable/units.sh b/.azure-pipelines/commands/units.sh
index dc115dec15..dc115dec15 100755
--- a/test/utils/shippable/units.sh
+++ b/.azure-pipelines/commands/units.sh
diff --git a/test/utils/shippable/windows.sh b/.azure-pipelines/commands/windows.sh
index 714588b88b..714588b88b 100755
--- a/test/utils/shippable/windows.sh
+++ b/.azure-pipelines/commands/windows.sh
diff --git a/test/lib/ansible_test/_internal/classification/__init__.py b/test/lib/ansible_test/_internal/classification/__init__.py
index c599d36edf..c030627b38 100644
--- a/test/lib/ansible_test/_internal/classification/__init__.py
+++ b/test/lib/ansible_test/_internal/classification/__init__.py
@@ -661,21 +661,54 @@ class PathMapper:
def _classify_ansible(self, path): # type: (str) -> t.Optional[t.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 = {} # type: t.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
@@ -791,39 +824,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',
diff --git a/test/sanity/code-smell/package-data.py b/test/sanity/code-smell/package-data.py
index b4e4172937..0f126b4a18 100644
--- a/test/sanity/code-smell/package-data.py
+++ b/test/sanity/code-smell/package-data.py
@@ -28,9 +28,6 @@ def assemble_files_to_ship(complete_file_list):
'hacking/tests/*',
'hacking/ticket_stubs/*',
'test/sanity/code-smell/botmeta.*',
- 'test/utils/*',
- 'test/utils/*/*',
- 'test/utils/*/*/*',
'test/results/.tmp/*',
'test/results/.tmp/*/*',
'test/results/.tmp/*/*/*',