Create TMPDIR for tests recursively

keystone/tests/tmp is missing in the sdist tarballs, so
we need to not only create keystone/tests/tmp/<pid> but also the
parent directory. Use os.makedirs for that.

Change-Id: I2f97bee517297b9fa239183c23ad1dfa52505bc9
Closes-Bug: #1296862
This commit is contained in:
Dirk Mueller 2014-03-24 18:46:36 +01:00
parent 0fb0dfdf41
commit 75d03a575b
2 changed files with 2 additions and 2 deletions

View File

@ -20,4 +20,4 @@ graft keystone/tests
graft tools
graft examples
recursive-include keystone *.json *.xml *.cfg *.pem README *.po *.pot *.sql
global-exclude *.pyc *.sdx *.log *.db *.swp tests/tmp/*
global-exclude *.pyc *.sdx *.log *.db *.swp keystone/tests/tmp/*

View File

@ -89,7 +89,7 @@ TMPDIR = _calc_tmpdir()
CONF = config.CONF
exception._FATAL_EXCEPTION_FORMAT_ERRORS = True
os.mkdir(TMPDIR)
os.makedirs(TMPDIR)
atexit.register(shutil.rmtree, TMPDIR)