Closed Bug 994847 Opened 9 years ago Closed 8 years ago
Create a python service that listens for events from marionette-js-runner and hooks into python toolchain
I have an initial prototype of this working here: https://github.com/ahal/gaia/tree/python_service (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 . Updating /system/b2g/defaults/settings.json manually still doesn't work however, because the code in  is only called when settingsDB.open fires the 'upgradeneeded' event. According to the IndexedDB docs, this happens when you pass in a greater version number than the previously specified one . 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.  http://mxr.mozilla.org/mozilla-central/source/dom/settings/SettingsDB.jsm#65  https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB#Opening_a_database
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!
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!
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
Status: NEW → ASSIGNED
Attachment #8458202 - Flags: review?(mdas)
Oops, that last attachment wasn't actually a link to a pull request
Comment on attachment 8458203 [details] [review] Add runner_service under gaia/tests/python looks great!
Attachment #8458203 - Flags: review?(mdas) → review+
https://github.com/mozilla-b2g/gaia/commit/db87de1fa75696c2a4c03bb8f15c2e3b46661d7d Try results were good: https://tbpl.mozilla.org/?rev=c7b085cdcc3f&tree=Gaia-Try (the Gij is perma-fail at the moment)
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.