summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2020-06-17 16:53:03 +0200
committerElod Illes <elod.illes@est.tech>2020-07-02 16:44:18 +0200
commit88cf5aebef790ff40ab8ca7219d537ccfc54d12e (patch)
tree46a2067e1b6dce2eddf1a8c1488fe915d7e75903
parent29c1f3990adaa62651ec96754c49e8043c97cc61 (diff)
downloadoslo-messaging-88cf5aebef790ff40ab8ca7219d537ccfc54d12e.tar.gz
Simplify tools/test-setup.sh
test-setup.sh is called after bindep is run in CI, and tox is not setup. Simplify the script so that it only does what's needed - install qdrouterd for Ubuntu from qpid/testing. Install the other packages using bindep, add test to amqp1 profile. Add amqp1 to bindep_profiles where needed for scenario tests, previously test-setup.sh added it everywhere. Conflicts: .zuul.yaml NOTE(elod.illes): conflict is due to scenario rationalizing patch I0f86416623a0b718516147f0660b4df2b74cf867 is not present in Train. Change-Id: Ic3a9e2c873619670edfbf71022d593f3cb5f70f2 Related-Bug: #1885923 (cherry picked from commit 7e406c312a6514e7ae377edb52b9e02b5bf37a7d) (cherry picked from commit dfcc4b0010d39d1f16be413bb1c3a4808718cd19)
-rw-r--r--.zuul.yaml2
-rw-r--r--bindep.txt29
-rwxr-xr-xtools/test-setup.sh26
3 files changed, 21 insertions, 36 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index d304110..0c3c23f 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -3,6 +3,7 @@
parent: openstack-tox-py27
vars:
tox_envlist: py27-func-amqp1
+ bindep_profile: amqp1
- job:
name: oslo.messaging-tox-py27-func-kafka
@@ -23,6 +24,7 @@
parent: openstack-tox-py36
vars:
tox_envlist: py36-func-amqp1
+ bindep_profile: amqp1
- job:
name: oslo.messaging-tox-py36-func-kafka
diff --git a/bindep.txt b/bindep.txt
index 88e9a89..ffd4761 100644
--- a/bindep.txt
+++ b/bindep.txt
@@ -15,21 +15,22 @@ rabbitmq-server [platform:dpkg rabbit]
rabbitmq-server [platform:rpm rabbit]
# AMQP1 dpkg
-qdrouterd [platform:dpkg amqp1]
-sasl2-bin [platform:dpkg amqp1]
-uuid-dev [platform:dpkg amqp1]
-swig [platform:dpkg amqp1]
-libsasl2-modules [platform:dpkg amqp1]
-openjdk-8-jdk [platform:dpkg amqp1]
+# This needs qpid/testing, will be installed by tools/test-setup.sh
+# qdrouterd [platform:dpkg amqp1 test]
+sasl2-bin [platform:dpkg amqp1 test]
+uuid-dev [platform:dpkg amqp1 test]
+swig [platform:dpkg amqp1 test]
+libsasl2-modules [platform:dpkg amqp1 test]
+openjdk-8-jdk [platform:dpkg amqp1 test]
-# AMQP1 rpm
-qpid-dispatch-router [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]
-java-1.8.0-openjdk [platform:rpm amqp1]
+# AMQP1 TEST rpm
+qpid-dispatch-router [platform:rpm amqp1 test]
+python-qpid-proton [platform:rpm amqp1 test]
+cyrus-sasl-lib [platform:rpm amqp1 test]
+cyrus-sasl-plain [platform:rpm amqp1 test]
+libuuid-devel [platform:rpm amqp1 test]
+swig [platform:rpm amqp1 test]
+java-1.8.0-openjdk [platform:rpm amqp1 test]
# kafka dpkg
openjdk-8-jdk [platform:dpkg kafka]
diff --git a/tools/test-setup.sh b/tools/test-setup.sh
index 0d49f7f..54a115e 100755
--- a/tools/test-setup.sh
+++ b/tools/test-setup.sh
@@ -6,21 +6,9 @@
# This setup for amqp1 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"
-}
-
-# NOTE(sileht): we create the virtualenv only and use bindep directly
-# because tox doesn't have a quiet option...
-tox -ebindep --notest
-
-# TODO(ansmith) for now setup amqp1 dependencies for any profile.
-# Fix this when test-setup is passed environment profile setting.
-
-# NOTE(sileht): bindep return 1 if some packages have to be installed
-PACKAGES="$(.tox/bindep/bin/bindep -b -f bindep.txt amqp1 || true)"
-
-[ -n "$PACKAGES" ] || exit 0
+# qdrouterd needs to be installed from qpid/testing repo in Ubuntu.
+# bindep does not allow setting up another repo, so we just install
+# this package here.
# inspired from project-config install-distro-packages.sh
if apt-get -v >/dev/null 2>&1 ; then
@@ -28,11 +16,5 @@ 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
+ --assume-yes install qdrouterd
fi