diff options
author | Matt Clay <matt@mystile.com> | 2022-08-15 14:47:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 14:47:30 -0700 |
commit | 9ec6e331bf13896e05a11677a4dece14b5136d4d (patch) | |
tree | 1a161efcd7434b3936067b429b3a1fe8149c2a70 /test | |
parent | bb675432b297469eb9e618e5507b833aff9e3ce9 (diff) | |
download | ansible-9ec6e331bf13896e05a11677a4dece14b5136d4d.tar.gz |
[stable-2.13] ansible-test - Fix self-test change handling. (#78521) (#78523)
(cherry picked from commit 99016653a29cc2c1c5aa05324ed92dabf5e9f1fc)
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/ansible_test/_internal/classification/__init__.py | 8 | ||||
-rw-r--r-- | test/lib/ansible_test/_internal/target.py | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/test/lib/ansible_test/_internal/classification/__init__.py b/test/lib/ansible_test/_internal/classification/__init__.py index 7a7e918b8d..c599d36edf 100644 --- a/test/lib/ansible_test/_internal/classification/__init__.py +++ b/test/lib/ansible_test/_internal/classification/__init__.py @@ -746,13 +746,13 @@ class PathMapper: if path.startswith('test/lib/ansible_test/_internal/commands/sanity/'): return { 'sanity': 'all', # test infrastructure, run all sanity checks - 'integration': 'ansible-test', # run ansible-test self tests + 'integration': 'ansible-test/', # run ansible-test self tests } if path.startswith('test/lib/ansible_test/_internal/commands/units/'): return { 'units': 'all', # test infrastructure, run all unit tests - 'integration': 'ansible-test', # run ansible-test self tests + 'integration': 'ansible-test/', # run ansible-test self tests } if path.startswith('test/lib/ansible_test/_data/requirements/'): @@ -776,13 +776,13 @@ class PathMapper: if path.startswith('test/lib/ansible_test/_util/controller/sanity/') or path.startswith('test/lib/ansible_test/_util/target/sanity/'): return { 'sanity': 'all', # test infrastructure, run all sanity checks - 'integration': 'ansible-test', # run ansible-test self tests + 'integration': 'ansible-test/', # run ansible-test self tests } if path.startswith('test/lib/ansible_test/_util/target/pytest/'): return { 'units': 'all', # test infrastructure, run all unit tests - 'integration': 'ansible-test', # run ansible-test self tests + 'integration': 'ansible-test/', # run ansible-test self tests } if path.startswith('test/lib/'): diff --git a/test/lib/ansible_test/_internal/target.py b/test/lib/ansible_test/_internal/target.py index 879a7944ec..3962b95f3b 100644 --- a/test/lib/ansible_test/_internal/target.py +++ b/test/lib/ansible_test/_internal/target.py @@ -611,6 +611,9 @@ class IntegrationTarget(CompletionTarget): groups += [a for a in static_aliases if a not in modules] groups += ['module/%s' % m for m in self.modules] + if data_context().content.is_ansible and (self.name == 'ansible-test' or self.name.startswith('ansible-test-')): + groups.append('ansible-test') + if not self.modules: groups.append('non_module') |