Last Comment Bug 780034 - Mochitest doesn't have the ability to stop b2g
: Mochitest doesn't have the ability to stop b2g
Status: RESOLVED WONTFIX
:
Product: Testing
Classification: Components
Component: Mochitest (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-02 16:35 PDT by dclarke@mozilla.com [:onecyrenus]
Modified: 2016-05-11 10:22 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description dclarke@mozilla.com [:onecyrenus] 2012-08-02 16:35:41 PDT
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.
Comment 1 dclarke@mozilla.com [:onecyrenus] 2012-08-02 16:38:19 PDT
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
Comment 2 Jonathan Griffin (:jgriffin) 2012-08-02 17:10:49 PDT
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.
Comment 3 Jonathan Griffin (:jgriffin) 2012-08-08 18:36:47 PDT
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.
Comment 4 Martijn Wargers [:mwargers] (not working for Mozilla) 2012-09-20 13:41:45 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.