|
|
@ -44,17 +44,27 @@ networks=(
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
for network in "${networks[@]}"; do
|
|
|
|
for network in "${networks[@]}"; do
|
|
|
|
group1+=(--exclude "test/units/modules/network/${network}/")
|
|
|
|
test_path="test/units/modules/network/${network}/"
|
|
|
|
group2+=("test/units/modules/network/${network}/")
|
|
|
|
|
|
|
|
|
|
|
|
if [ -d "${test_path}" ]; then
|
|
|
|
|
|
|
|
group1+=(--exclude "${test_path}")
|
|
|
|
|
|
|
|
group2+=("${test_path}")
|
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
case "${group}" in
|
|
|
|
case "${group}" in
|
|
|
|
1) options=("${group1[@]}") ;;
|
|
|
|
1) options=("${group1[@]:+${group1[@]}}") ;;
|
|
|
|
2) options=("${group2[@]}") ;;
|
|
|
|
2) options=("${group2[@]:+${group2[@]}}") ;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${#options[@]} -eq 0 ] && [ "${group}" -eq 2 ]; then
|
|
|
|
|
|
|
|
# allow collection migration unit tests for group 2 to "pass" without updating shippable.yml or this script during migration
|
|
|
|
|
|
|
|
echo "No unit tests found for group ${group}."
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
ansible-test env --timeout "${timeout}" --color -v
|
|
|
|
ansible-test env --timeout "${timeout}" --color -v
|
|
|
|
|
|
|
|
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
# shellcheck disable=SC2086
|
|
|
|
ansible-test units --color -v --docker default --python "${version}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
|
|
|
ansible-test units --color -v --docker default --python "${version}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
|
|
|
"${options[@]}" \
|
|
|
|
"${options[@]:+${options[@]}}" \
|
|
|
|