Automatic debug breaking on a test failure

Gijs Kruitbosch gijskruitbosch at gmail.com
Mon Nov 4 16:17:32 UTC 2013


As Felipe and I just discussed on IRC, sadly --run-until-failure doesn't 
work with multiple tests yet ( 
https://bugzilla.mozilla.org/show_bug.cgi?id=916797 ). He/We will be 
trying to fix that ASAP, as it's a bit misleading as-is (hence the 
beautiful write-up below!).

Otherwise, please read and use the below! It is awesome and will really 
simplify debugging and fixing (random/intermittent) test failures. :-)

~ Gijs

On 04/11/13, 17:05 , Felipe G wrote:
> Following the great addition of the --jsdebugger option for mochitests 
> [1], yet another new feature just landed [2]: if you use the 
> --jsdebugger to have the debugger attached during your test run, you 
> now have the option to automatically break execution and enter the 
> debugger whenever a testcase fails. Very useful to examine the code 
> and state at the exact place the test failed without having to set 
> breakpoints in advance!
>
> To do that, just use the --debug-on-failure option in addition to the 
> --jsdebugger option. Like so:
>
> ./mach mochitest-browser --jsdebugger --debug-on-failure <my-test>
>
>
> It should work with mochitest-{plain,chrome,browser}
>
>
> And there's more! If you ever thought "oh I wish there was a way to 
> automatically catch an intermittent failure w/ the debugger with no 
> effort", then you're in for a treat..
>
> Landed a couple of months ago is an option to repeatedly run a test 
> (or a directory, or a set of tests, really) several times until it 
> fails [3]. If you combine it with these two new recent features, what 
> you get is a command that will do everything for you and pause 
> execution when the intermittent test actually fails..
>
> ./mach mochitest-browser --jsdebugger --debug-on-failure 
> --run-until-failure <my-test>
>
>
> Felipe
>
> [1] 
> https://mail.mozilla.org/pipermail/firefox-dev/2013-October/001043.html
> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=932144
> [3] https://bugzilla.mozilla.org/show_bug.cgi?id=875463
>
>
>
> _______________________________________________
> firefox-dev mailing list
> firefox-dev at mozilla.org
> https://mail.mozilla.org/listinfo/firefox-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20131104/610cf514/attachment.html>


More information about the firefox-dev mailing list