Mochitest doesn't have the ability to stop b2g

RESOLVED WONTFIX

Status

Testing
Mochitest
RESOLVED WONTFIX
5 years ago
a year ago

People

(Reporter: onecyrenus, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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.
(Reporter)

Updated

5 years ago
Blocks: 771725
(Reporter)

Comment 1

5 years ago
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: http://mxr.mozilla.org/mozilla-central/source/build/mobile/b2gautomation.py#108.

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 http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/specialpowers/chrome.manifest, 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.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.