Updated from OpenStack Ansible Tests

Change-Id: I30ae09f1fe693934e5d713d4d37960a1b212483e
This commit is contained in:
OpenStack Proposal Bot 2017-06-22 15:19:43 +00:00
parent 75262aeca9
commit ae92d79dc0
2 changed files with 16 additions and 9 deletions

5
.gitignore vendored
View File

@ -61,12 +61,11 @@ ChangeLog
releasenotes/build
# Test temp files
tests/plugins
tests/common
tests/test.retry
tests/*.retry
# Vagrant artifacts
.vagrant
# Git clones
openstack-ansible-ops

View File

@ -34,28 +34,39 @@ export TESTING_HOME=${TESTING_HOME:-$HOME}
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
## Main ----------------------------------------------------------------------
## Functions -----------------------------------------------------------------
function create_tests_clonemap {
# Prepare the clonemap for zuul-cloner to use
# This is placed here instead of inside the conditional
# to prevent indentation problems.
cat > ${TESTING_HOME}/tests-clonemap.yaml << EOF
clonemap:
- name: openstack/openstack-ansible-tests
dest: ${WORKING_DIR}/tests/common
EOF
}
## Main ----------------------------------------------------------------------
# If zuul-cloner is present, use it so that we
# also include any dependent patches from the
# tests repo noted in the commit message.
if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
# Prepare the clonemap for zuul-cloner to use
create_tests_clonemap
# Execute the clone
/usr/zuul-env/bin/zuul-cloner \
--cache-dir /opt/git \
--map ${TESTING_HOME}/tests-clonemap.yaml \
git://git.openstack.org \
openstack/openstack-ansible-tests
# Clean up the clonemap.
rm -f ${TESTING_HOME}/tests-clonemap.yaml
# Alternatively, use a simple git-clone. We do
# not re-clone if the directory exists already
# to prevent overwriting any local changes which
@ -73,9 +84,6 @@ elif [[ ! -d tests/common ]]; then
fi
fi
# Clean up the clonemap.
rm -f ${TESTING_HOME}/tests-clonemap.yaml
# If this test set includes an upgrade test, the
# previous stable release tests repo must also be
# cloned.