diff options
author | John R Barker <john@johnrbarker.com> | 2016-10-19 19:41:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-19 19:41:00 +0100 |
commit | 77ac192f3b9b32143c5fd303810c079c9fa31100 (patch) | |
tree | c2da58b67a05dc08ce1ad93461f21c882a535b97 /test | |
parent | bd151643668da651b0d81ae7fae608c9fdd88349 (diff) | |
download | ansible-modules-extras-77ac192f3b9b32143c5fd303810c079c9fa31100.tar.gz |
Run validate-modules from ansible/ansible (#3242)
* Run validate-modules from ansible/ansible
* Update sanity.sh
Diffstat (limited to 'test')
-rwxr-xr-x | test/utils/shippable/sanity.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/test/utils/shippable/sanity.sh b/test/utils/shippable/sanity.sh index d9234cf0..248f4d97 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-get update -qq && apt-get install python2.4 -qq @@ -13,10 +21,14 @@ if [ "${install_deps}" != "" ]; then apt-get update -qq apt-get install shellcheck - 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 |