summaryrefslogtreecommitdiff
path: root/test/utils
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2018-01-24 11:07:24 -0800
committerMatt Clay <matt@mystile.com>2018-01-25 09:45:36 -0800
commit7abdab6c9e6347851fbe106266e57788c58e29c7 (patch)
tree6eebdeab6694a750187d96ec93f0c7a10775f754 /test/utils
parent0ce8d389a4048ca89941536aeffd468c0e369bdd (diff)
downloadansible-7abdab6c9e6347851fbe106266e57788c58e29c7.tar.gz
Convert ansible-test compile into a sanity test.
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/shippable/other.sh24
-rwxr-xr-xtest/utils/shippable/sanity.sh26
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[@]}"