##### SUMMARY

Support collection roles as integration test targets.

Now that https://github.com/ansible/ansible/issues/59462 has been merged, ansible-test can be updated to support running integration test targets that are collection roles.

The planned convention is to look for targets under `roles/test/` and allow use of target-specific plugins from `plugins/{plugin_type}/test/{target_name}/`.

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

##### ADDITIONAL INFORMATION

This will allow integration test targets to be written using collections instead of pre-collection roles.
"""
    :type integration_targets: list[IntegrationTarget]
    :rtype: dict[str, set[IntegrationTarget]]
    """
    targets_dict = dict((target.name, target) for target in integration_targets)
    target_dependencies = analyze_integration_target_dependencies(integration_targets)
    dependency_map = {}
    invalid_targets = set()
    for dependency, dependents in target_dependencies.items():
        dependency_target = targets_dict.get(dependency)
        if not dependency_target:
            invalid_targets.add(dependency)
            continue
        for dependent in dependents:
            if dependent not in dependency_map:
                dependency_map[dependent] = set()
            dependency_map[dependent].add(dependency_target)
    if invalid_targets:
        raise ApplicationError('Non-existent target dependencies: %s' % ', '.join(sorted(invalid_targets)))
    return dependency_map
def get_files_needed(target_dependencies):