Closed Bug 915810 Opened 8 years ago Closed 6 years ago

B2G mochitests should work with device builds

Categories

(Testing :: Mochitest, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ahal, Unassigned)

References

Details

Attachments

(1 file)

While working on bug 914836, I noticed that mochitests couldn't be run on devices at all. There were quite a large string of errors and typos that followed each other, so I'm not sure if they even ever worked.

At any rate, I want to fix them for devices before announcing the mach target changes more broadly if possible.
This patch gets me much further along in the setup process. Unfortunately I only have a Leo phone available at the moment and there is a bug where the touch screen doesn't work with those for master which means I can't connect it to the wifi (I also couldn't get Dave Hunt's gcli program to work).

There is a chance this patch is all that's needed, but I won't know for sure until I can get my hands on another phone for testing (maybe I'll steal my inari back for a bit tomorrow).
I managed to get connected to the network, but with this patch the run just seems to time out. Basically we get to the point where we load b2g_start_script.js, but then the test run never gets kicked off. I made sure both the host and the device are on the same network. I also checked that the test-container and mochitest apps are present. The only potentially interesting thing in the logcat was:

JavaScript Error: "DebuggerServer._connections is not an object" {file: "chrome://browser/content/settings.js" line: 320}

.. but I think that is unrelated.

Not sure what to do here and I need to return my device to Rob's endurance test setup, so probably punting on this for the short term.
Assignee: ahalberstadt → nobody
Status: ASSIGNED → NEW
Duplicate of this bug: 937427
Comment on attachment 803876 [details] [diff] [review]
Patch 1.0 Fix mozrunner errors

Even though this patch doesn't totally fix the issue, it gets us closer. I should just land it so that other people can more easily try debugging the problems locally without needing to land this patch (which fixes some obvious and glaring errors).
Attachment #803876 - Attachment description: WIP 1.0 → Patch 1.0 Fix mozrunner errors
Attachment #803876 - Flags: review?(jgriffin)
Comment on attachment 803876 [details] [diff] [review]
Patch 1.0 Fix mozrunner errors

Review of attachment 803876 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.  Yes I agree we should land as-is to make further debugging easier.

::: mozrunner/mozrunner/remote.py
@@ +67,4 @@
>  
>          super(RemoteRunner, self).cleanup()
>  
> +        subprocess.Popen([self.dm._adbPath, 'remount']).communicate()

DevicemanagerADB has a 'remount' method; we should probably just use that.

@@ +256,4 @@
>          """
>          Copy profile and update the remote profiles ini file to point to the new profile
>          """
> +        subprocess.Popen([self.dm._adbPath, 'remount']).communicate()

Same as above.
Attachment #803876 - Flags: review?(jgriffin) → review+
Made the remount change and pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=1c9f0dc939d6
Try run looks good, landed: https://github.com/mozilla/mozbase/commit/16238fd2b2bc483aa2b852432b2e44ed1b5276e4

I'll leave this open since as far as I know mochitests on devices are still broken. Should at least be easier to debug once the above gets synced to m-c.
Bug 952464 tracks the issue where the Network manager resets the network.proxy.type pref when data is enabled. So we either need to wait for that to be fixed properly, or add a hack to b2g_start_script.js to work around it.
Depends on: 952464
David, did you have the patch needed for this on your local machine? Or were you waiting for me to create it based on the patch in bug 952464?
Flags: needinfo?(dclarke)
https://bugzilla.mozilla.org/show_bug.cgi?id=959499

I added the hack in b2g_start_script.js.
Flags: needinfo?(dclarke)
Can anyone confirm that this bug is still valid? I've been trying to run mochitests on device following the instructions at https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Mochitests#Running_mochitests_on_device_and_emulator_builds without success.
On-device support for mochitests has never been a priority.  I'm tempted to WONTFIX this unless someone has a specific use case that requires this.
(In reply to Jonathan Griffin (:jgriffin) from comment #12)
> On-device support for mochitests has never been a priority.  I'm tempted to
> WONTFIX this unless someone has a specific use case that requires this.

I wouldn't say "require", but for people who do most of their work/testing/debugging on device builds, it is much more convenient to be able to run/debug mochitests on the same build, rather than having to do a separate emulator build.
(In reply to Botond Ballo [:botond] from comment #13)
> (In reply to Jonathan Griffin (:jgriffin) from comment #12)
> > On-device support for mochitests has never been a priority.  I'm tempted to
> > WONTFIX this unless someone has a specific use case that requires this.
> 
> I wouldn't say "require", but for people who do most of their
> work/testing/debugging on device builds, it is much more convenient to be
> able to run/debug mochitests on the same build, rather than having to do a
> separate emulator build.

Not just because builds are slow, but also because the emulator is slow in general.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.