Respect $TMPDIR environment variable to run tests

On Fedora 20, /tmp now uses the tmpfs file system which means that all
files are stored in memory. Running Ceilometer tests write 1.2 GB in
/tmp.

This patch allows to set the TMPDIR environment variable to run tests in
a different temporary directoy. So I can use a directory on disk to not
use all my memory.

Change-Id: Ib87a988a4acb3cb568d3f3dda641f5a824f986da
This commit is contained in:
Victor Stinner 2014-06-09 17:24:52 +02:00
parent 3b720b6809
commit aff15eaf99

View File

@ -9,7 +9,7 @@ function clean_exit(){
}
# Setup MongoDB test server
MONGO_DATA=`mktemp -d /tmp/CEILO-MONGODB-XXXXX`
MONGO_DATA=`mktemp -d --tmpdir CEILO-MONGODB-XXXXX`
MONGO_PORT=29000
trap "clean_exit" EXIT
mkfifo ${MONGO_DATA}/out