diff options
author | Mehdi Abaakouk <sileht@redhat.com> | 2015-06-10 10:00:09 +0000 |
---|---|---|
committer | Mehdi Abaakouk <sileht@redhat.com> | 2015-06-11 12:01:01 +0200 |
commit | 80ece65a547db332b345a0a433f17602af058b56 (patch) | |
tree | e64d6ac46934fe2c51b6153d1c22df5a0f7efe26 /tools/functions.sh | |
parent | 2e5ba4538edc08424bea12e0fc0bad54578d8b3e (diff) | |
download | oslo-messaging-80ece65a547db332b345a0a433f17602af058b56.tar.gz |
Don't use devstack to setup our functional env
This adds a setup script for each tox functional target to start a
rabbitmq-server, qpidd or redis daemon dedicated for the functional
testing.
This script is responsible to spawn a preconfigured daemon needed for
the functional tests.
This also changes the gate script to just install the required packages
instead of setup a devstack.
This also fixes the zmq config options loading in tests
Closes-bug: #1442612
Change-Id: I27eb2c1d3d0ca67aa361c83e41372138e03d9bdd
Diffstat (limited to 'tools/functions.sh')
-rw-r--r-- | tools/functions.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/functions.sh b/tools/functions.sh new file mode 100644 index 0000000..6581487 --- /dev/null +++ b/tools/functions.sh @@ -0,0 +1,19 @@ + +wait_for_line () { + while read line + do + echo "$line" | grep -q "$1" && break + echo "$line" | grep "$2" && exit 1 + done < "$3" + # Read the fifo for ever otherwise process would block + cat "$3" >/dev/null & +} + +function clean_exit(){ + local error_code="$?" + kill -9 $(jobs -p) + rm -rf "$1" + return $error_code +} + + |