Add bindep.txt/test-setup.sh to prepare the system
Change-Id: I9ac3132c082a31020dc2bf2a778fb5c4c0836c4c
This commit is contained in:
parent
626c27def5
commit
5fc28ec9cf
35
bindep.txt
Normal file
35
bindep.txt
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# common dpkg
|
||||||
|
gettext [platform:dpkg] # For releasenotes job
|
||||||
|
build-essential [platform:dpkg]
|
||||||
|
libffi-dev [platform:dpkg]
|
||||||
|
|
||||||
|
# common rpm
|
||||||
|
gcc [platform:rpm]
|
||||||
|
gcc-c++ [platform:rpm]
|
||||||
|
make [platform:rpm]
|
||||||
|
pkg-config [platform:rpm]
|
||||||
|
libffi-devel [platform:rpm]
|
||||||
|
|
||||||
|
# kombu/pika
|
||||||
|
rabbitmq-server [platform:dpkg rabbit pika]
|
||||||
|
|
||||||
|
# zeromq
|
||||||
|
redis-sentinel [platform:ubuntu !platform:ubuntu-trusty zeromq]
|
||||||
|
redis-server [platform:dpkg zeromq]
|
||||||
|
python-redis [platform:dpkg zeromq]
|
||||||
|
zookeeperd [platform:dpkg zeromq]
|
||||||
|
|
||||||
|
# AMQP1 dpkg
|
||||||
|
qpidd [platform:dpkg amqp1]
|
||||||
|
sasl2-bin [platform:dpkg amqp1]
|
||||||
|
uuid-dev [platform:dpkg amqp1]
|
||||||
|
swig [platform:dpkg amqp1]
|
||||||
|
|
||||||
|
# AMQP1 rpm
|
||||||
|
qpid-cpp-server [platform:rpm amqp1]
|
||||||
|
qpid-proton-c-devel [platform:rpm amqp1]
|
||||||
|
python-qpid-proton [platform:rpm amqp1]
|
||||||
|
cyrus-sasl-lib [platform:rpm amqp1]
|
||||||
|
cyrus-sasl-plain [platform:rpm amqp1]
|
||||||
|
libuuid-devel [platform:rpm amqp1]
|
||||||
|
swig [platform:rpm amqp1]
|
36
tools/test-setup.sh
Executable file
36
tools/test-setup.sh
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash -xe
|
||||||
|
|
||||||
|
# This script will be run by OpenStack CI before unit tests are run,
|
||||||
|
# it sets up the test system as needed.
|
||||||
|
# Developer should setup their test systems in a similar way.
|
||||||
|
|
||||||
|
# This setup needs to be run by a user that can run sudo.
|
||||||
|
|
||||||
|
function is_fedora {
|
||||||
|
[ -f /usr/bin/yum ] && cat /etc/*release | grep -q -e "Fedora"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Looks like /home/jenkins/worspace/gate-oslo.messaging-tox-py27-func-rabbit-ubuntu-xenial
|
||||||
|
JOB_NAME=${WORKSPACE##*/}
|
||||||
|
|
||||||
|
if [ "${JOB_NAME//gate-oslo.messaging-tox-py*-func-/}" == "${JOB_NAME}" ]; then
|
||||||
|
# not a functional test
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
BINDEP_PROFILE=$(echo $JOB_NAME | cut -d- -f6)
|
||||||
|
PACKAGES=$(tox -e bindep -- -b -f bindep.txt $BINDEP_PROFILE)
|
||||||
|
|
||||||
|
# inspired from project-config install-distro-packages.sh
|
||||||
|
if apt-get -v >/dev/null 2>&1 ; then
|
||||||
|
sudo apt-get -qq update
|
||||||
|
sudo PATH=/usr/sbin:/sbin:$PATH DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get -q --option "Dpkg::Options::=--force-confold" \
|
||||||
|
--assume-yes install $PACKAGES
|
||||||
|
elif emerge --version >/dev/null 2>&1 ; then
|
||||||
|
sudo emerge -uDNq --jobs=4 @world
|
||||||
|
sudo PATH=/usr/sbin:/sbin:$PATH emerge -q --jobs=4 $PACKAGES
|
||||||
|
else
|
||||||
|
is_fedora && YUM=dnf || YUM=yum
|
||||||
|
sudo PATH=/usr/sbin:/sbin:$PATH $YUM install -y $PACKAGES
|
||||||
|
fi
|
4
tox.ini
4
tox.ini
@ -125,3 +125,7 @@ commands = pip-missing-reqs -d --ignore-module=oslo_messaging* --ignore-file=osl
|
|||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
|
[testenv:bindep]
|
||||||
|
deps = bindep
|
||||||
|
commands = bindep {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user