use flags for sqlite db names and fix flags in dhcpbridge

This commit is contained in:
Vishvananda Ishaya
2011-02-23 11:20:52 -08:00
parent 3abd858d3f
commit 7ffd9ed353
6 changed files with 25 additions and 22 deletions

View File

@@ -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,