summaryrefslogtreecommitdiffstats
path: root/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests.py')
-rw-r--r--run_tests.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/run_tests.py b/run_tests.py
index 01a1cf8bc..88c42bd31 100644
--- a/run_tests.py
+++ b/run_tests.py
@@ -46,13 +46,17 @@ import unittest
import sys
from nose import config
-from nose import result
from nose import core
+from nose import result
+from nova import flags
from nova import log as logging
from nova.tests import fake_flags
+FLAGS = flags.FLAGS
+
+
class _AnsiColorizer(object):
"""
A colorizer is an object that loosely wraps around a stream, allowing
@@ -259,10 +263,11 @@ class NovaTestRunner(core.TextTestRunner):
if __name__ == '__main__':
logging.setup()
- testdir = os.path.abspath(os.path.join("nova","tests"))
- testdb = os.path.join(testdir, "tests.sqlite")
+ testdb = os.path.join(FLAGS.state_path,
+ FLAGS.sqlite_db)
if os.path.exists(testdb):
os.unlink(testdb)
+ testdir = os.path.abspath(os.path.join("nova","tests"))
c = config.Config(stream=sys.stdout,
env=os.environ,
verbosity=3,