<br><br><div class="gmail_quote">On Sat, Jun 20, 2009 at 2:49 AM, Vincent Ladeuil <span dir="ltr">&lt;<a href="mailto:v.ladeuil%2Blp@free.fr">v.ladeuil+lp@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try:<br>
<br>
  bzr --no-plugins selftest -s bt.test_http<br>
<br>
That will be faster.<br>
</blockquote><div><br>Thanks.  I&#39;ve been doing that (and using --list to find my way around) as you suggest.<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In the following, I&#39;ll use either &#39;bzr&#39; or &#39;/usr/bin/bzr&#39;. As<br>
mentioned in the other thread, &#39;usr/bin/bzr&#39;, aka the PPA jaunty<br>
version is exhibiting the bugs while running from the 1.15<br>
sources doesn&#39;t. I still haven&#39;t understood why, I&#39;m using it to<br>
reproduce the problem.<br>
</blockquote><div><br>I will see if I can reproduce your result... runs from source but not from packaged build.<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

You can try --randomize if you want to play with test order, but<br>
I doubt that&#39;s the root cause here.<br>
</blockquote><div><br><br>Confirmed: order seems to make no difference.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Each test has a unique ID in the test suite (that&#39;s not strictly<br>

enforced, but is true 99.99999% of the time, if you find an<br>
exception, tells us ;-).<br>
</blockquote><div class="im"><br>Ouch.  I am assuming 100% uniqueness.  I will watch for that now.<br><br> <br> 
 test_http.TestAuth.test_wrong_pass(pycurl,HTTP/1.1,basicdigest)<br>
<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">An implicit bzrlib.tests doesn&#39;t appear here, so the full ID is really:<br>
<br>
  bzrlib.tests.test_http.TestAuth.test_wrong_pass(pycurl,HTTP/1.1,basicdigest) <br></blockquote><div><br>Yes.  I thought that was pretty clear.  Dropping the &#39;bzrlib.tests.&#39; prefix makes it easier to see what&#39;s going on and also works great with --exclude.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Here, we&#39;re talking about a test method &#39;test_wrong_pass&#39; in the<br>
TestAuth class in the bzrlib/tests/test_http.py file.<br>
</blockquote><div><br>Yep.  I&#39;ve been poking around in that exact file looking for clues.  No joy yet.  (See other posts.)<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

&#39;pycurl&#39; , &#39;HTTP/1.1&#39; and &#39;basicdigest&#39; are parameters for the<br>
test, you can generally find which test object attributes receive<br>
these values by looking for a load_tests() method in the test<br>
file or at the test class definition.<br>
</blockquote><div><br>See above.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Knowing that, to isolate the failing test, you can try things like:<br>
<br>
  bzr --no-plugins selftest -s bt.test_http Activity.*urllib --list | wc -l<br>
16<br>
  bzr selftest -s bt.test_http Activity.*urllib --list | wc -l<br>
16 <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
16 out of the 406: faster and more precise (we exclude pycurl)<br>
and no need to type --no-plugins anymore (knowing that no plugins<br>
can influence *these* tests is an art, I&#39;m pretty sure no<br>
plugins can influence *these* tests, but who knows ;-)<br>
</blockquote><div><br>My result is different.  <br> <br> bzr --no-plugins selftest -s bt.test_http Activity.*urllib --list | wc -l<br><br>gives<br><br>16est 0/16] Starting<br><br>which I believe is the result of &#39;wc&#39; and the progressbar fighting for stdout.<br>
<br>So I suggest using &#39;-v&#39; to keep everything neat:<br><br>bzr --no-plugins selftest -s bt.test_http Activity.*urllib --list -v | wc -l<br><br>gives<br><br>19<br><br>Yes: 19, not 16.  <br>Maybe you are using an environment variable to suppress progressbar.  And maybe it is test 16 for your build and 19 for mine.  Anyway, the key thing as John pointed out is to be wary of output buffered by progressbar.<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Note that bt is a shortcut for bzrlib.tests, there is also bb for<br>
bzrlib.tests.blackbox and bp for bzrlib.plugins.<br>
</blockquote><div><br>Nice.  Thanks!<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
But wait<br>
<br>
  bzr --no-plugins selftest -s bt.test_http Activity.*pycurl --list | wc -l<br>
0<br>
</blockquote><div><br><br>Not here.  If I run the same command I get<br><br>16est 0/16] Starting<br><br>Again, the progress bar (in 1.15-1) is messing with us.<br><br>So if I run verbose<br><br>bzr --no-plugins selftest test_http --list -v | wc -l<br>
<br>I get <br><br>19<br><br>which is close but wrong because of the three leading lines printed by bzr selftest.<br><br>So what we really want is<br><br>bzr --no-plugins selftest test_http --list -v | grep &#39;bzrlib.tests&#39; | wc -l<br>
<br>which gives<br><br>16<br><br>as expected.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Huh ? Where are the pycurl tests ? Looks like a bug ! Damn, I<br>
fixed that one, I&#39;m sure... Anyway, unrelated to the problem at<br>
hand.<br>
<br>
Back to diagnosis:<br>
<br>
  /usr/bin/bzr selftest -s bzrlib.tests.test_http.TestActivity -x https -v<br>
tests passed<br>
</blockquote><div><br>Same here.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
  /usr/bin/bzr selftest -s bzrlib.tests.test_http.TestActivity https -v<br>
hangs<br>
</blockquote><div><br> Same here.  As in my original report.<br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
/usr/bin/bzr selftest -s bzrlib.tests.test_http.TestActivity.test_get https --list<br>
bzrlib.tests.test_http.TestActivity.test_get(urllib,HTTP/1.0,https)<br>
bzrlib.tests.test_http.TestActivity.test_get(urllib,HTTP/1.1,https) <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Right, only two tests left (note that other TestActivity with<br>
https hangs too, but most probably that&#39;s the same cause).<br>
</blockquote><div><br>Could be.  I don&#39;t know the code well enough yet to speculate about that.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I&#39;ll dig that bug and the one about pycurl test missing.<br>
<br>
Using:<br>
<br>
  bzr selftest -s bt.test_http.TestActivity -x https -v<br>
<br>
passes here, so that should get you unblocked on that one.<br>
</blockquote><div><br>That&#39;s what I&#39;ve been doing, just a little less surgically.  I pick which suites to run or exclude, but don&#39;t usually bother with -s.  Either way, we&#39;re both doing divide and conquer I think.<br>
</div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I hope these explanations are helpful, I realize there is a lot<br>
to learn about using selftest as a diagnosis tool (as opposed to<br>
using it as a validation tool when running the whole test suite)<br>
<font color="#888888"></font></blockquote><div><br>Yes.  And the most helpful thing is conformation that we are both seeing some of the same things using the PPA.<br><br>I have not repeated my testing on the source distribution.  That should be my next step.<br>
<br>Thanks!  It&#39;s good to know that I&#39;m not the only one seeing this.<br><br>-M<br><br><br><br></div></div><br>