Fwiw, I used to perform a search-replace `add_task` => `/*add_task*/` to
deactivate everything, then uncomment individual tasks.
Of course, your solution looks cleaner, especially if it can be made to
work via mach.
Cheers,
David
On 19/01/16 13:39, Philipp Kewisch wrote:
> Hi Folks,
>
> I have just recently pushed bug 1192533, which will allow more fine
> grained debugging in xpcshell tests. I often had the problem that only a
> single task within a test was failing. Running the test over and over
> again took longer because all the other tasks had to run. I wished we
> could use .only() and .skip() as you may know from mocha tests.
>
> Well, now you can! It currently requires editing the file instead of
> running via a mach parameter, but since you are fixing an issue you'll
> be editing the file anyway.
>
> Before:
>
> add_task(function* my_test() {
> // the failing task.
> // ...
> });
>
> add_test(function my_async_test() {
> // a working test.
> // ...
> run_next_test();
> });
>
> After:
>
> add_task.only(function* my_test() {
> // the failing task, ready to debug
> });
>
> add_test.skip(function my_async_test() {
> // a working test.
> // ...
> run_next_test();
> });
>
> Then run the test as usual, no extra parameters.
>
> Don't forget to remove the .only/.skip when you are done. With a little
> extra effort this could be changed to pass the task name via mach, I've
> made a suggestion how to do this in the bug comment 3.
>
> Philipp
> _______________________________________________
> dev-platform mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform