diff options
author | Matt Clay <matt@mystile.com> | 2018-01-24 11:07:24 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2018-01-25 09:45:36 -0800 |
commit | 7abdab6c9e6347851fbe106266e57788c58e29c7 (patch) | |
tree | 6eebdeab6694a750187d96ec93f0c7a10775f754 /test/utils | |
parent | 0ce8d389a4048ca89941536aeffd468c0e369bdd (diff) | |
download | ansible-7abdab6c9e6347851fbe106266e57788c58e29c7.tar.gz |
Convert ansible-test compile into a sanity test.
Diffstat (limited to 'test/utils')
-rwxr-xr-x | test/utils/shippable/other.sh | 24 | ||||
-rwxr-xr-x | test/utils/shippable/sanity.sh | 26 |
2 files changed, 26 insertions, 24 deletions
diff --git a/test/utils/shippable/other.sh b/test/utils/shippable/other.sh deleted file mode 100755 index 526339759e..0000000000 --- a/test/utils/shippable/other.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -eux - -set -o pipefail - -shippable.py - -echo '{"verified": false, "results": []}' > test/results/bot/ansible-test-failure.json - -if [ "${BASE_BRANCH:-}" ]; then - base_branch="origin/${BASE_BRANCH}" -else - base_branch="" -fi -# shellcheck disable=SC2086 -ansible-test compile --failure-ok --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} --docker default -# shellcheck disable=SC2086 -ansible-test sanity --failure-ok --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} --docker default --docker-keep-git --base-branch "${base_branch}" - -rm test/results/bot/ansible-test-failure.json - -if find test/results/bot/ -mindepth 1 -name '.*' -prune -o -print -quit | grep -q .; then - echo "One or more of the above tests reported at least one failure." - exit 1 -fi diff --git a/test/utils/shippable/sanity.sh b/test/utils/shippable/sanity.sh new file mode 100755 index 0000000000..d62251b5a5 --- /dev/null +++ b/test/utils/shippable/sanity.sh @@ -0,0 +1,26 @@ +#!/bin/bash -eux + +set -o pipefail + +declare -a args +IFS='/:' read -ra args <<< "$1" + +group="${args[1]}" + +shippable.py + +if [ "${BASE_BRANCH:-}" ]; then + base_branch="origin/${BASE_BRANCH}" +else + base_branch="" +fi + +case "${group}" in + 1) options=(--skip-test pylint) ;; + 2) options=(--test pylint) ;; +esac + +# shellcheck disable=SC2086 +ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \ + --docker --docker-keep-git --base-branch "${base_branch}" \ + "${options[@]}" |