Closed Bug 780034 Opened 8 years ago Closed 4 years ago

Mochitest doesn't have the ability to stop b2g


(Testing :: Mochitest, defect)

Not set


(Not tracked)



(Reporter: onecyrenus, Unassigned)


SpecialPowers.Quit doesn't seem to be working. I think it has to do with the fact that the SpecialPowers extension is excluded. 

I think we are missing SpecialPowersObserver.js which may be part of the extension, which is excluded.
Blocks: 771725
The end result here is that you aren't able to quit the browser when the test run has completed. Without the browser quitting the framework just sits and waits for a timeout to occur. 

I think this is what is happening at least
So how it's supposed to work (and how it does work on emulators) is that output from the tests is examined here:

When the line 'INFO SimpleTest FINISHED' is seen, then the test is finished, and the harness performs its cleanup code.

If mochitest isn't ending on the device, either this line is never being output, or the harness isn't seeing that output.
David and I talked about this a bit on IRC.

This problem is such that it prevents the mochitest testrunner from recognizing the end of test when running a single test (as opposed to a test directory), since in the former case SimpleTest does not output "INFO SimpleTest FINISHED".

The problem is not caused by lack of SpecialPowers.  We exclude it from mochitest because it is already being loaded by Marionette, and otherwise the two would conflict.  The problem is that we're not registering SpecialPowersObserver.js at startup, ala, so the two API's which rely on this ("Quit" and "SPPingService") do not work.

At this point, I think this is a nice-to-have (since you can terminate a single-test testrun using CTRL+C) and not critical to running mochitests on Otoro so I'm going to remove this from blocking bug 771725.
No longer blocks: 771725
What I'm seeing is that when I'm running a single mochitest in b2g and it has Simpletest.finish() in it, then the b2g emulator is closed, but when I'm running a single mochitest that doesn't have Simpletest.finish(), then the b2g emulator isn't closed.
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.