summaryrefslogtreecommitdiff
path: root/test/utils/shippable/network.sh
diff options
context:
space:
mode:
authorMatt Clay <mclay@redhat.com>2020-02-23 18:37:26 -0800
committerGitHub <noreply@github.com>2020-02-23 18:37:26 -0800
commita64b56207148650819cf6d3b3eb98816b4cae84e (patch)
tree26ca5aec154e7fcead370f00b676969a304f266d /test/utils/shippable/network.sh
parentdbaa421f9d7d2649c6e78d35dc2bb5cb1afcafdc (diff)
downloadansible-a64b56207148650819cf6d3b3eb98816b4cae84e.tar.gz
Fix up network testing on Shippable. (#67678)
This prepares for code coverage collection for initial setup of incidental test coverage.
Diffstat (limited to 'test/utils/shippable/network.sh')
-rwxr-xr-xtest/utils/shippable/network.sh43
1 files changed, 13 insertions, 30 deletions
diff --git a/test/utils/shippable/network.sh b/test/utils/shippable/network.sh
index a232ef7f6a..43dddd5866 100755
--- a/test/utils/shippable/network.sh
+++ b/test/utils/shippable/network.sh
@@ -2,16 +2,17 @@
set -o pipefail -eux
-# shellcheck disable=SC2086
-ansible-test network-integration --explain ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; }
-{ grep ' network-integration: .* (targeted)$' /tmp/explain.txt || true; } > /tmp/network.txt
+declare -a args
+IFS='/:' read -ra args <<< "$1"
-if [ "${COVERAGE}" == "--coverage" ]; then
- # when on-demand coverage is enabled, force tests to run for all network platforms
- echo "coverage" > /tmp/network.txt
-fi
+platform="${args[0]}"
+version="${args[1]}"
-target="shippable/network/"
+if [ "${#args[@]}" -gt 2 ]; then
+ target="shippable/${platform}/group${args[2]}/"
+else
+ target="shippable/${platform}/"
+fi
stage="${S:-prod}"
provider="${P:-default}"
@@ -23,27 +24,9 @@ python_versions=(
3.6
)
-if [ -s /tmp/network.txt ]; then
- echo "Detected changes requiring integration tests specific to networking:"
- cat /tmp/network.txt
-
- echo "Running network integration tests for multiple platforms concurrently."
-
- platforms=(
- --platform vyos/1.1.8
- )
-else
- echo "No changes requiring integration tests specific to networking were detected."
- echo "Running network integration tests for a single platform only."
-
- platforms=(
- --platform vyos/1.1.8
- )
-fi
-
-for version in "${python_versions[@]}"; do
+for python_version in "${python_versions[@]}"; do
# terminate remote instances on the final python version tested
- if [ "${version}" = "${python_versions[-1]}" ]; then
+ if [ "${python_version}" = "${python_versions[-1]}" ]; then
terminate="always"
else
terminate="never"
@@ -51,7 +34,7 @@ for version in "${python_versions[@]}"; do
# shellcheck disable=SC2086
ansible-test network-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
- "${platforms[@]}" \
- --docker default --python "${version}" \
+ --platform "${platform}/${version}" \
+ --docker default --python "${python_version}" \
--remote-terminate "${terminate}" --remote-stage "${stage}" --remote-provider "${provider}"
done