6 if [ "$1" = "--coverage" ]; then
11 export PATH=${PATH:+$PATH:}/sbin:/usr/sbin
14 # Start MongoDB process for tests
15 MONGO_DATA=`mktemp -d /tmp/CEILO-MONGODB-XXXXX`
17 trap "clean_exit ${MONGO_DATA}" EXIT
18 mkfifo ${MONGO_DATA}/out
19 mongod --maxConns 32 --nojournal --noprealloc --smallfiles --quiet --noauth --port ${MONGO_PORT} --dbpath "${MONGO_DATA}" --bind_ip localhost --config /dev/null &>${MONGO_DATA}/out &
20 # Wait for Mongo to start listening to connections
21 wait_for_line "waiting for connections on port ${MONGO_PORT}" ${MONGO_DATA}/out
22 # Read the fifo for ever otherwise mongod would block
23 cat ${MONGO_DATA}/out > /dev/null &
24 export CEILOMETER_TEST_STORAGE_URL="mongodb://localhost:${MONGO_PORT}/ceilometer"
26 # Yield execution to venv command
27 OS_TEST_PATH=./ceilometer/tests/unit $*