summaryrefslogtreecommitdiff
path: root/test/utils/shippable/network.sh
blob: 09b7469d68f6512bbd43f973a824a40d418a3c06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash -eux

set -o pipefail

ansible-test network-integration --explain 2>&1 | { grep ' network-integration: .* (targeted)$' || true; } > /tmp/network.txt

target="network/ci/"

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."

    ansible-test network-integration --color -v --retry-on-error "${target}" --requirements \
        --platform vyos/1.1.8 \
        --platform ios/csr1000v \

else
    echo "No changes requiring integration tests specific to networking were detected."
    echo "Running network integration tests for a single platform only."

    ansible-test network-integration --color -v --retry-on-error "${target}" --requirements \
        --platform vyos/1.1.8
fi