deckhand/tools/run_pifpaf.sh
Felipe Monteiro 3353833dba Update Deckhand test-/requirements.txt
This simply updates Deckhand's package versions in
test-requirements.txt and requirements.txt using `pur -r` command
line tool.

Change-Id: If4bbd85190502c52a7f10adf6af750172b54c234
2018-06-16 18:18:28 -04:00

29 lines
534 B
Bash
Executable File

#!/usr/bin/env bash
# This script is used for guaranteeing that `pifpaf` returns non-zero codes
# upon test failure.
function cleanup {
set +e
pifpaf_stop || deactivate
}
trap cleanup EXIT
# Instantiate an ephemeral PostgreSQL DB and print out the `pifpaf` environment
# variables for debugging purposes.
set -ex
if [ -z $(which pg_config) ]; then
sudo apt-get install libpq-dev -y
fi
eval `pifpaf run postgresql`
env | grep PIFPAF
set +ex
set -eo pipefail
TESTRARGS=$1
stestr run --concurrency=1 --slowest $TESTRARGS