summaryrefslogtreecommitdiff
path: root/test/utils/shippable/sanity.sh
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2016-09-16 22:27:21 -0700
committerGitHub <noreply@github.com>2016-09-16 22:27:21 -0700
commite14cb1a06c9ed7b5db5fc12d17e562b5500bf817 (patch)
tree5d739df3692484e461ada2fc03051e9871618ffb /test/utils/shippable/sanity.sh
parent24da3602c6c2817485f6055a3ef0b200aef2795f (diff)
downloadansible-modules-extras-e14cb1a06c9ed7b5db5fc12d17e562b5500bf817.tar.gz
Run same tests on Shippable as on Travis. (#2948)
Run the same tests as used on Travis.
Diffstat (limited to 'test/utils/shippable/sanity.sh')
-rwxr-xr-xtest/utils/shippable/sanity.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/utils/shippable/sanity.sh b/test/utils/shippable/sanity.sh
new file mode 100755
index 00000000..5ff826ef
--- /dev/null
+++ b/test/utils/shippable/sanity.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -eux
+
+source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))")
+
+install_deps="${INSTALL_DEPS:-}"
+
+cd "${source_root}"
+
+if [ "${install_deps}" != "" ]; then
+ add-apt-repository ppa:fkrull/deadsnakes && apt-get update -qq && apt-get install python2.4 -qq
+
+ pip install git+https://github.com/ansible/ansible.git@devel#egg=ansible
+ pip install git+https://github.com/sivel/ansible-testing.git#egg=ansible_testing
+fi
+
+python2.4 -m compileall -fq -i "test/utils/shippable/sanity-test-python24.txt"
+python2.4 -m compileall -fq -x "($(printf %s "$(< "test/utils/shippable/sanity-skip-python24.txt"))" | tr '\n' '|')" .
+python2.6 -m compileall -fq .
+python2.7 -m compileall -fq .
+python3.5 -m compileall -fq . -x "($(printf %s "$(< "test/utils/shippable/sanity-skip-python3.txt"))" | tr '\n' '|')"
+
+ansible-validate-modules --exclude '/utilities/|/shippable(/|$)' .