##### 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.
"""Code for finding content."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import abc
import collections
import os
from ... import types as t
from ...util import (
    ANSIBLE_SOURCE_ROOT,
)
from .. import (
    PathProvider,
)
class Layout:
    """Description of content locations and helper methods to access content."""
    def __init__(self,
                 root,  
                 paths,  
                 ):  
        self.root = root
        self.__paths = paths  
        self.__files = [path for path in paths if not path.endswith(os.path.sep)]  
        self.__paths_tree = paths_to_tree(self.__paths)
        self.__files_tree = paths_to_tree(self.__files)
    def all_files(self, include_symlinked_directories=False):  
        """Return a list of all file paths."""
        if include_symlinked_directories:
            return self.__paths
        return self.__files
    def walk_files(self, directory, include_symlinked_directories=False):