From 4f5c0c64ec9d397048dfd7b8d5c007ec0fa39ec5 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Wed, 12 Jan 2011 16:57:04 -0800 Subject: add support for database migration --- run_tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index 5b8617f63..fbca3cbe3 100644 --- a/run_tests.py +++ b/run_tests.py @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - +import gettext import os import unittest import sys @@ -26,6 +26,10 @@ from nose import config from nose import result from nose import core +gettext.install('nova', unicode=1) + +from nova.db import migration + class NovaTestResult(result.TextTestResult): def __init__(self, *args, **kw): @@ -61,6 +65,9 @@ if __name__ == '__main__': c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3) + + migration.db_sync() + runner = NovaTestRunner(stream=c.stream, verbosity=c.verbosity, -- cgit From 7f352a72333e94c642d8288638c73a166cfb2943 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 18 Jan 2011 17:32:54 -0800 Subject: move db sync into nosetests package-level fixtures so that the existing nosetests attempt in hudson will pass --- run_tests.py | 7 ------- 1 file changed, 7 deletions(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index fbca3cbe3..7b5e2192a 100644 --- a/run_tests.py +++ b/run_tests.py @@ -26,10 +26,6 @@ from nose import config from nose import result from nose import core -gettext.install('nova', unicode=1) - -from nova.db import migration - class NovaTestResult(result.TextTestResult): def __init__(self, *args, **kw): @@ -65,9 +61,6 @@ if __name__ == '__main__': c = config.Config(stream=sys.stdout, env=os.environ, verbosity=3) - - migration.db_sync() - runner = NovaTestRunner(stream=c.stream, verbosity=c.verbosity, -- cgit From b2ec5bf282f212f251479ec2bde520bc21531435 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Thu, 20 Jan 2011 15:05:55 +0100 Subject: Pass a PluginManager to nose.config.Config(). This lets us use plugins like coverage, xcoverage, etc. --- run_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index 7b5e2192a..5c8436aee 100644 --- a/run_tests.py +++ b/run_tests.py @@ -60,7 +60,8 @@ class NovaTestRunner(core.TextTestRunner): if __name__ == '__main__': c = config.Config(stream=sys.stdout, env=os.environ, - verbosity=3) + verbosity=3, + plugins=core.DefaultPluginManager()) runner = NovaTestRunner(stream=c.stream, verbosity=c.verbosity, -- cgit