##### SUMMARY

Running tests on collections which have dependencies with the `--docker` option is not currently supported. Only the collection being tested is copied into the container.

All collections in the same collection root should be copied into the container. Support for dependencies in other collection roots will not be supported. It will be up to the user to make sure all the necessary dependencies are already installed in the same collection root. If unnecessary collections are present, those will be copied as well.

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

ansible-test

files = [f for f in files if not is_subdir(f[1], 'lib/ansible/modules/') or f[1] == 'lib/ansible/modules/__init__.py']
        if data_context().content.collection:
            
            files.extend((os.path.join(data_context().content.root, path), os.path.join(data_context().content.collection.directory, path))
                         for path in data_context().content.all_files())
    for callback in data_context().payload_callbacks:
        callback(files)
    
    files = sorted(set(files))
    display.info('Creating a payload archive containing %d files...' % len(files), verbosity=1)
    start = time.time()
    with tarfile.TarFile.gzopen(dst_path, mode='w', compresslevel=4) as tar:
        for src, dst in files:
            display.info('%s -> %s' % (src, dst), verbosity=4)
            tar.add(src, dst, filter=filters.get(dst))
    duration = time.time() - start
    payload_size_bytes = os.path.getsize(dst_path)
    display.info('Created a %d byte payload archive containing %d files in %d seconds.' % (payload_size_bytes, len(files), duration), verbosity=1)
def create_temporary_bin_files(args):  
    """Create a temporary ansible bin directory populated using the symlink map."""
    if args.explain:
        temp_path = '/tmp/ansible-tmp-bin'
    else:
        temp_path = tempfile.mkdtemp(prefix='ansible', suffix='bin')
        atexit.register(remove_tree, temp_path)
        for name, dest in ANSIBLE_BIN_SYMLINK_MAP.items():
            path = os.path.join(temp_path, name)
            os.symlink(dest, path)
    return tuple((os.path.join(temp_path, name), os.path.join('bin', name)) for name in sorted(ANSIBLE_BIN_SYMLINK_MAP))