summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/collection/setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/collection/setup.sh')
-rwxr-xr-xtest/integration/targets/collection/setup.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/targets/collection/setup.sh b/test/integration/targets/collection/setup.sh
index 74466555e1..346a21ca9a 100755
--- a/test/integration/targets/collection/setup.sh
+++ b/test/integration/targets/collection/setup.sh
@@ -12,6 +12,9 @@
#
# 3) Sanity tests which are multi-version require an ignore entry per Python version.
# This script replicates these ignore entries for each supported Python version based on the ignored path.
+#
+# 4) Windows tests need access to the ansible.windows vendored collection.
+# This script copies any of the existing collections in ANSIBLE_COLLECTIONS_PATH to the temporary directory.
set -eu -o pipefail
@@ -26,4 +29,8 @@ trap 'rm -rf "${WORK_DIR}"' EXIT
cp -a "${TEST_DIR}/ansible_collections" "${WORK_DIR}"
cd "${WORK_DIR}/ansible_collections/ns/${COLLECTION_NAME:-col}"
+if [ "${ANSIBLE_COLLECTIONS_PATH:+set}" = "set" ]; then
+ cp -aL "${ANSIBLE_COLLECTIONS_PATH}"/ansible_collections/* "${WORK_DIR}/ansible_collections"
+fi
+
"${TEST_DIR}/../collection/update-ignore.py"