diff options
author | John R Barker <john@johnrbarker.com> | 2016-10-24 15:35:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-24 15:35:36 +0100 |
commit | a452032ede8f1b21954557403de8db446c1f24dc (patch) | |
tree | 75c39572c167449f217a58cc2ac9f72e0bd372ab | |
parent | 531e09ce167c44387fc9c6505dd0453a7251b8f9 (diff) | |
download | ansible-modules-core-a452032ede8f1b21954557403de8db446c1f24dc.tar.gz |
Run versioned validate-module from ansible/ansible stable-2.1 (#5331)
* Run versioned validate-module from ansible/ansible stable-2.1
See ansible/ansible#18001 for more details
* Update sanity.sh
* Submodules need updating
-rwxr-xr-x | test/utils/shippable/sanity.sh | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/utils/shippable/sanity.sh b/test/utils/shippable/sanity.sh index 6614ef08..de74a798 100755 --- a/test/utils/shippable/sanity.sh +++ b/test/utils/shippable/sanity.sh @@ -6,16 +6,31 @@ install_deps="${INSTALL_DEPS:-}" cd "${source_root}" +build_dir=$(mktemp -d) +trap 'rm -rf "${build_dir}"' EXIT + +git clone "https://github.com/ansible/ansible.git" "${build_dir}" --recursive +cd "${build_dir}" +git checkout stable-2.1 +git submodule update --init +cd "${source_root}" +source "${build_dir}/hacking/env-setup" + 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@stable-2.1#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 . python2.7 -m compileall -fq . -ansible-validate-modules --exclude '/utilities/|/shippable(/|$)' . +ANSIBLE_DEPRECATION_WARNINGS=false \ + "${validate_modules}" --exclude '/utilities/|/shippable(/|$)' . |