diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-23 18:11:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-23 18:11:41 +0000 |
| commit | 041b97dc3d2dde7f0a0c8c175f723e36feae8777 (patch) | |
| tree | 86d1bf15698cd16381bc89392e4633875fcc089f /nova/testing | |
| parent | 939f082cc2fb0b71bb601f80e3ea95d0be355e4c (diff) | |
| parent | 6cb1658459d7906d81882c29f22d7d1e5ba22c69 (diff) | |
Merge "Actual fix for bug 931608."
Diffstat (limited to 'nova/testing')
| -rw-r--r-- | nova/testing/runner.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/nova/testing/runner.py b/nova/testing/runner.py index 69bff0d21..70d7d7155 100644 --- a/nova/testing/runner.py +++ b/nova/testing/runner.py @@ -343,9 +343,10 @@ class NovaTestRunner(core.TextTestRunner): def run(): - flags.FLAGS.register_cli_opt(cfg.BoolOpt('hide-elapsed', default=False)) - flags.FLAGS.register_cli_opt(cfg.BoolOpt("stop", short='x', default=False)) - argv = flags.FLAGS(sys.argv) + # This is a fix to allow the --hide-elapsed flag while accepting + # arbitrary nosetest flags as well + argv = [x for x in sys.argv if x != '--hide-elapsed'] + hide_elapsed = argv != sys.argv logging.setup() # If any argument looks like a test name but doesn't have "nova.tests" in @@ -364,7 +365,7 @@ def run(): runner = NovaTestRunner(stream=c.stream, verbosity=c.verbosity, config=c, - show_elapsed=not flags.FLAGS.hide_elapsed) + show_elapsed=not hide_elapsed) sys.exit(not core.run(config=c, testRunner=runner, argv=argv)) |
