diff options
author | Matt Clay <matt@mystile.com> | 2017-05-14 15:04:52 +0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2017-05-14 18:27:58 +0800 |
commit | fdcad0f44d0a10470be7270196765bf1f46864d4 (patch) | |
tree | 0388fba08cf74087bf0b351c8146fef1410520ef /test/utils/shippable/network.sh | |
parent | 5cb5228cde65d33744b91f6099d92368d15cf0b7 (diff) | |
download | ansible-fdcad0f44d0a10470be7270196765bf1f46864d4.tar.gz |
Improve on-demand coverage for Shippable.
Diffstat (limited to 'test/utils/shippable/network.sh')
-rwxr-xr-x | test/utils/shippable/network.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/utils/shippable/network.sh b/test/utils/shippable/network.sh index 9cf076f7d7..e54a08d43d 100755 --- a/test/utils/shippable/network.sh +++ b/test/utils/shippable/network.sh @@ -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 |