Closed Bug 994847 Opened 9 years ago Closed 9 years ago

Create a python service that listens for events from marionette-js-runner and hooks into python toolchain


(Firefox OS Graveyard :: Gaia::TestAgent, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: ahal, Assigned: ahal)




(1 file, 1 obsolete file)

I have an initial prototype of this working here:

(still lots of cleanup and polishing to do)

I plan to get this working with b2g desktop first (since then I'll have a baseline to compare it to). Then shift focus to emulators and devices.
Bug 997244 is finally wrapping up (sorry it took so long). I'll get back to working on this in earnest soon.
I've made some progress on this. Tests run (sort of), but they all fail because it seems like the settings.json in the generated profile isn't getting picked up by gaia. Basically the way we install the profile is:

1) Copy profile over
2) Change /data/b2g/mozilla/profiles.ini to point at it
3) Restart b2g process (or in the case of a device, reboot)

This works with prefs/webapps/etc.. but the things in settings.json don't seem to get picked up.
I figured out what's happening with the help of gerard-majax, but not the best way to fix it.

First the hunch that we needed to update /system/b2g/defaults/settings.json is correct. Apparently settings.json is only read from the profile in b2g desktop [1].

Updating /system/b2g/defaults/settings.json manually still doesn't work however, because the code in [1] is only called when fires the 'upgradeneeded' event. According to the IndexedDB docs, this happens when you pass in a greater version number than the previously specified one [2]. I don't know why 'upgradeneeded' isn't being fired after rebooting the device (I've verified that the changes aren't getting overwritten).

One way to hack around this would be to just call navigator.mozSettings.createLock().set() after the reboot, but this would depend on the python marionette-client, which I've been trying very hard not to depend on. If worst comes to worst, I'll just do that.

Fabrice, could you help shed some light regarding comment 3? For context I'm trying to get gaia-integration tests running on device and each test can have its own special settings.json.

Much appreciated!
Flags: needinfo?(fabrice)
I haven't followed everything here, but I can answer this:

(In reply to Andrew Halberstadt [:ahal] from comment #3)
> I don't know why 'upgradeneeded' isn't being fired after rebooting the
> device (I've verified that the changes aren't getting overwritten).

The version that needs to change is the DB version... and you're not changing it.

Does that make sense?
Yes, though I was more wondering what the best way to accomplish this was. I talked to gwagner, and deleting the settingsDB before restarting seems to do what I want. Thanks!
Flags: needinfo?(fabrice)
Hey Malini, would you mind doing the review for this? I flagged you because you seemed interested in helping out earlier.

I can run Gi on device with this locally (and a bunch of other patches in various stages of landing), but there is still a lot of work to do. I mainly want to land what I have so far now because there has been a lot of interest from various parties in helping out, and landing this lowers the barrier for them. So just keep in mind that some things may be incomplete/missing :)
Assignee: nobody → ahalberstadt
Attachment #8458202 - Flags: review?(mdas)
Oops, that last attachment wasn't actually a link to a pull request
Attachment #8458202 - Attachment is obsolete: true
Attachment #8458202 - Flags: review?(mdas)
Attachment #8458203 - Flags: review?(mdas)
Comment on attachment 8458203 [details] [review]
Add runner_service under gaia/tests/python

looks great!
Attachment #8458203 - Flags: review?(mdas) → review+

Try results were good:

(the Gij is perma-fail at the moment)
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.