summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn R Barker <john@johnrbarker.com>2016-10-19 17:38:56 +0100
committerGitHub <noreply@github.com>2016-10-19 17:38:56 +0100
commit53e452e88b1c920d0c941fec604f3c684d67b588 (patch)
tree93e3ff63325055c98dbac66f82163f78aea4737c
parentced24b7b03584afeb9fc0a5789ab866a933503be (diff)
downloadansible-modules-core-53e452e88b1c920d0c941fec604f3c684d67b588.tar.gz
Run validate-modules from ansible/ansible@devel (#5257)
* Run validate-modules from devel Use a clean dir for checkout typo Correct path validate-modules requires mock and voluptuous==0.8.8 typo Ensure script is running Remove testing debug Install Ansible only once Install ansible and validate_modules requirements Now that we no longer pip install Ansible we need to manually install it's dependencies Debug Dependencies are listed in ansible/ansible debug submodules typo typo working * Matt's feedback * Use mktemp to checkout and delete directory after running * Single quotes
-rwxr-xr-xtest/utils/shippable/sanity.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/utils/shippable/sanity.sh b/test/utils/shippable/sanity.sh
index cc0830fa..84dab4c5 100755
--- a/test/utils/shippable/sanity.sh
+++ b/test/utils/shippable/sanity.sh
@@ -6,6 +6,14 @@ install_deps="${INSTALL_DEPS:-}"
cd "${source_root}"
+# FIXME REPOMERGE: No need to checkout ansible
+build_dir=$(mktemp -d)
+trap 'rm -rf "{$build_dir}"' EXIT
+
+git clone "https://github.com/ansible/ansible.git" "${build_dir}" --recursive
+source "${build_dir}/hacking/env-setup"
+# REPOMERGE: END
+
if [ "${install_deps}" != "" ]; then
add-apt-repository ppa:fkrull/deadsnakes
apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe'
@@ -13,10 +21,14 @@ if [ "${install_deps}" != "" ]; then
apt-get install -qq shellcheck python2.4
- 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
+ # Install dependencies for ansible and validate_modules
+ pip install -r "${build_dir}/test/utils/shippable/sanity-requirements.txt" --upgrade
+ pip list
+
fi
+validate_modules="${build_dir}/test/sanity/validate-modules/validate-modules"
+
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 .
@@ -24,7 +36,7 @@ python2.7 -m compileall -fq .
python3.5 -m compileall -fq . -x "($(printf %s "$(< "test/utils/shippable/sanity-skip-python3.txt"))" | tr '\n' '|')"
ANSIBLE_DEPRECATION_WARNINGS=false \
- ansible-validate-modules --exclude '/utilities/|/shippable(/|$)' .
+ "${validate_modules}" --exclude '/utilities/|/shippable(/|$)' .
shellcheck \
test/utils/shippable/*.sh