project-config/jenkins/scripts/run-tox-with-oslo-master.sh
Davanum Srinivas f747d7c0e9 Experimental jobs for testing against oslo.* from master - Take #2
In I82ef7a5d5a3c1076efbd4306b7099cd28960cd90, we added periodic jobs
for Nova to test py27 and py34 tox targets against oslo.* from master
branch on a daily basis. In this review we are expanding the set to
some more projects that oslo releases tend to break :)

Change-Id: Ibdfc03f27450a5392acc276f98bfb464f9a0f663
2016-02-06 09:23:02 -05:00

103 lines
3.2 KiB
Bash
Executable File

#!/bin/bash -xe
# If a bundle file is present, call tox with the jenkins version of
# the test environment so it is used. Otherwise, use the normal
# (non-bundle) test environment. Also, run pbr freeze on the
# resulting environment at the end so that we have a record of exactly
# what packages we ended up testing.
#
# Usage: run-tox.sh VENV
#
# Where VENV is the name of the tox environment to run (specified in the
# project's tox.ini file).
venv=$1
if [[ -z "$venv" ]]; then
echo "Usage: $?"
echo
echo "VENV: The tox environment to run (eg 'python27')"
exit 1
fi
script_path=/usr/local/jenkins/slave_scripts
cat << EOF > oslo-from-master.sh
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.cache.git#egg=oslo.cache
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.concurrency.git#egg=oslo.concurrency
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.config.git#egg=oslo.config
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.context.git#egg=oslo.context
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.i18n.git#egg=oslo.i18n
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.log.git#egg=oslo.log
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.messaging.git#egg=oslo.messaging
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.middleware.git#egg=oslo.middleware
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.policy.git#egg=oslo.policy
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.privsep.git#egg=oslo.privsep
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.reports.git#egg=oslo.reports
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.rootwrap.git#egg=oslo.rootwrap
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.serialization.git#egg=oslo.serialization
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.service.git#egg=oslo.service
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.utils.git#egg=oslo.utils
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.versionedobjects.git#egg=oslo.versionedobjects
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.vmware.git#egg=oslo.vmware
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslosphinx.git#egg=oslosphinx
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslotest.git#egg=oslotest
pip install -q -U \
-e git+https://git.openstack.org/openstack/oslo.db.git#egg=oslo.db
pip freeze | grep oslo
EOF
# NOTE(dims): tox barfs when there are {posargs} references
# in the commands we reference
sed -ri 's/\{posargs\}//g' tox.ini
cat << EOF >> tox.ini
[testenv:py27-oslo-master]
commands =
bash oslo-from-master.sh
{[testenv]commands}
EOF
if grep "^\[testenv:py34\]" tox.ini
then
cat << EOF >> tox.ini
[testenv:py34-oslo-master]
posargs =
commands =
bash oslo-from-master.sh
{[testenv:py34]commands}
EOF
else
cat << EOF >> tox.ini
[testenv:py34-oslo-master]
posargs =
commands =
bash oslo-from-master.sh
{[testenv]commands}
EOF
fi
$script_path/run-tox.sh $venv-oslo-master