##### 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.
packages.append('coverage')
        if args.junit:
            packages.append('junit-xml')
    if not python_version:
        python_version = args.python_version
    pip = generate_pip_command(find_python(python_version))
    commands = [generate_pip_install(pip, args.command, packages=packages)]
    if isinstance(args, IntegrationConfig):
        for cloud_platform in get_cloud_platforms(args):
            commands.append(generate_pip_install(pip, '%s.cloud.%s' % (args.command, cloud_platform)))
    commands = [cmd for cmd in commands if cmd]
    
    detect_pip_changes = len(commands) > 1
    
    changes = run_pip_commands(args, pip, commands, detect_pip_changes)
    if changes:
        
        changes = run_pip_commands(args, pip, commands, detect_pip_changes)
        if changes:
            raise ApplicationError('Conflicts detected in requirements. The following commands reported changes during verification:\n%s' %
                                   '\n'.join((' '.join(cmd_quote(c) for c in cmd) for cmd in changes)))
    
    try:
        run_command(args, pip + ['check', '--disable-pip-version-check'], capture=True)
    except SubprocessError as ex:
        if ex.stderr.strip() == 'ERROR: unknown command "check"':
            display.warning('Cannot check pip requirements for conflicts because "pip check" is not supported.')
        else:
            raise
def run_pip_commands(args, pip, commands, detect_pip_changes=False):