mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
910 B
Bash
53 lines
910 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -o pipefail -eux
|
|
|
|
declare -a args
|
|
IFS='/:' read -ra args <<< "$1"
|
|
|
|
group="${args[1]}"
|
|
|
|
group2_include=(
|
|
ansible-doc
|
|
changelog
|
|
package-data
|
|
pep8
|
|
pylint
|
|
validate-modules
|
|
)
|
|
|
|
group3_include=(
|
|
docs-build
|
|
sanity-docs
|
|
)
|
|
|
|
group1_exclude=(
|
|
"${group2_include[@]}"
|
|
"${group3_include[@]}"
|
|
)
|
|
|
|
options=()
|
|
|
|
case "${group}" in
|
|
1)
|
|
for name in "${group1_exclude[@]}"; do
|
|
options+=(--skip-test "${name}")
|
|
done
|
|
;;
|
|
2)
|
|
for name in "${group2_include[@]}"; do
|
|
options+=(--test "${name}")
|
|
done
|
|
;;
|
|
3)
|
|
for name in "${group3_include[@]}"; do
|
|
options+=(--test "${name}")
|
|
done
|
|
;;
|
|
esac
|
|
|
|
# shellcheck disable=SC2086
|
|
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
|
--docker \
|
|
"${options[@]}" --allow-disabled
|