Sounds like a plan to me Monty.  Lets take this offline.<div><br></div><div>best,</div><div>Joe<br><div><br><div class="gmail_quote">On Tue, Feb 14, 2012 at 8:51 PM, Monty Taylor <span dir="ltr"><<a href="mailto:mordred@inaugust.com">mordred@inaugust.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<div class="im"><br>
On 02/14/2012 07:29 PM, Joe Gordon wrote:<br>
> Hi Developers,<br>
><br>
> I have been looking at <a href="https://bugs.launchpad.net/nova/+bug/931608" target="_blank">https://bugs.launchpad.net/nova/+bug/931608</a>,<br>
> "run_tests.sh (-x | --stop) is broken."  A fix was committed but it only<br>
> stopped "./run_tests.sh -x" from failing, and not restoring the<br>
> "./run_tests.sh -x" functionality.<br>
><br>
> "run_tests.sh (-x | --stop)" is a nosetests parameter which gets passed<br>
> in via nova/testing/runner.py:367.  sys.argv for nova/testing/runner.py,<br>
> takes two sets of parameters nova parameters and any arbitrary nosetests<br>
</div>> parameter.  The nova flags (hide-elapsed etc..) are handled via<br>
<div class="im">> 'flags.FLAGS.register_cli_opt' and the nosetest parameters are generated<br>
> from the args return value from optparse<br>
> (nova/openstack/common/cfg.py:768:   "(values, args) =<br>
> self._oparser.parse_args(self._args)" ).<br>
><br>
> The problem is when optparse sees an unknown flag (such as '-x') it<br>
> terminates the program without throwing an error.  Additionally the<br>
> 'args' return value doesn't contain the flags just flag arguments (only<br>
> 'a' in '-x a').  So there is no way of passing on just the unknown flags<br>
> to nosetest.  Additionally nosetest uses optparse itself so if you pass<br>
> in sys.argv to nosetest with a nova argument set will case the tests to<br>
</div>> break too.<member:jog0><br>
<div class="im">><br>
><br>
> While I can write a hack to look for 'hide-elapsed' or other nova flags,<br>
> I am looking for more elegant solutions.  Should this solution live in<br>
> the cfg module?<br>
<br>
</div>So - you and I may be working in parallel here, but in different directions.<br>
<br>
I'm currently working on getting install_venv/with_venv replaced by tox.<br>
That may not sound related to your issue, but step #2 on my list of that<br>
project is to get nova/testing/runner.py replaced by pure nosetests<br>
(with the openstack.nose_plugin installed so that we can get our pretty<br>
output)<br>
<br>
My vote is - gimme a hand with that, and we can then pass things<br>
straight through to their proper place, and we can stop carrying a<br>
custom test runner.<br>
<br>
Monty<br>
<br>
_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
</blockquote></div><br></div></div>