summaryrefslogtreecommitdiff
path: root/run-tests.sh
blob: 732302b6e748b4cf2c532137c1e5399077a278d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -e
set -x

# Use a mongodb backend by default
if [ -z $CEILOMETER_TEST_BACKEND ]; then
    CEILOMETER_TEST_BACKEND="mongodb"
fi

echo
echo "OS_TEST_PATH: $OS_TEST_PATH"
echo "CEILOMETER_TEST_BACKEND: $CEILOMETER_TEST_BACKEND"
echo "CEILOMETER_TEST_DEBUG: $CEILOMETER_TEST_DEBUG"
echo

if [ "$CEILOMETER_TEST_BACKEND" == "none" ]; then
    if [ "$CEILOMETER_TEST_DEBUG" == "True" ]; then
        oslo_debug_helper $*
    else
        ./tools/pretty_tox.sh $*
    fi
else
    for backend in $CEILOMETER_TEST_BACKEND; do
        if [ "$CEILOMETER_TEST_DEBUG" == "True" ]; then
            pifpaf --debug run $backend oslo_debug_helper $*
        else
            pifpaf run $backend ./tools/pretty_tox.sh $*
        fi
    done
fi