Improve on-demand coverage for Shippable.

This commit is contained in:
Matt Clay
2017-05-14 15:04:52 +08:00
parent 5cb5228cde
commit fdcad0f44d
10 changed files with 48 additions and 20 deletions

View File

@@ -2,7 +2,13 @@
set -o pipefail
ansible-test network-integration --explain 2>&1 | { grep ' network-integration: .* (targeted)$' || true; } > /tmp/network.txt
# shellcheck disable=SC2086
ansible-test network-integration --explain ${CHANGED:+"$CHANGED"} 2>&1 | { grep ' network-integration: .* (targeted)$' || true; } > /tmp/network.txt
if [ "${COVERAGE}" ]; then
# when on-demand coverage is enabled, force tests to run for all network platforms
echo "coverage" > /tmp/network.txt
fi
target="network/ci/"
@@ -13,7 +19,7 @@ if [ -s /tmp/network.txt ]; then
echo "Running network integration tests for multiple platforms concurrently."
# shellcheck disable=SC2086
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--platform vyos/1.1.0 \
--platform ios/csr1000v \
@@ -22,6 +28,6 @@ else
echo "Running network integration tests for a single platform only."
# shellcheck disable=SC2086
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--platform vyos/1.1.0
fi