Closed
Bug 959499
Opened 11 years ago
Closed 10 years ago
B2G Mochitests on Device: Ability to register to a specific wifi network
Categories
(Testing :: Mochitest, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla29
People
(Reporter: onecyrenus, Assigned: onecyrenus)
References
Details
Attachments
(1 file, 6 obsolete files)
5.24 KB,
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
To run mochitests on device you have to have the host machine and the client on the same wifi network. Currently there is no mechanism to configure the device to connect to a specific wifi access point. The mechanism now is to setup the device manually prior to a test run.
Comment 1•11 years ago
|
||
Good idea, we can use https://developer.mozilla.org/en-US/docs/Web/API/WifiManager.associate to try and connect to the network the host is hooked up to. It would be cool if we could just access the functions in gaiatest's gaia_test.py (https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L333) without needing to import everything else.. but that's another bug for another time.
Assignee | ||
Comment 2•11 years ago
|
||
Tested seems to work against Mozilla Guest
Attachment #8360886 -
Flags: review?(ahalberstadt)
Assignee | ||
Comment 3•11 years ago
|
||
Slightly better help documentation
Attachment #8360886 -
Attachment is obsolete: true
Attachment #8360886 -
Flags: review?(ahalberstadt)
Attachment #8360892 -
Flags: review?(ahalberstadt)
Comment 4•10 years ago
|
||
Comment on attachment 8360892 [details] [diff] [review] Bug_95499.patch Review of attachment 8360892 [details] [diff] [review]: ----------------------------------------------------------------- r+ with a few nits and suggestions. I'd like to see an example of what to type at the command line.. I guess it isn't a huge deal, especially if most people are using mach these days anyway. ::: testing/mochitest/b2g_start_script.js @@ +85,5 @@ > + let manager = navigator.mozWifiManager; > + let con = manager.connection; > + if(wifiSettings) { > + if (manager.enabled) { > + manager.associate(wifiSettings); nit: trailing whitespace @@ +87,5 @@ > + if(wifiSettings) { > + if (manager.enabled) { > + manager.associate(wifiSettings); > + } else { > + manager.onenabled = function () { nit: trailing whitespace ::: testing/mochitest/mochitest_options.py @@ +574,5 @@ > + [["--wifi"], > + { "action": "store", > + "type": "string", > + "dest": "wifi", > + "help": "Define mozWifiManager connection: network associate json string expected", So we need to type json at the command line? That seems a little clunky :/. What's an example value you'd type? Should also mention it only works with a device build, maybe append (device only). ::: testing/mochitest/runtestsb2g.py @@ +115,5 @@ > self.buildURLOptions(options, {'MOZ_HIDE_RESULTS_TABLE': '1'}) > + if not options.emulator: > + self.test_script_args.append(True) > + else: > + self.test_script_args.append(False) This can be re-written as: self.test_script_args.append(not options.emulator)
Attachment #8360892 -
Flags: review?(ahalberstadt) → review+
Assignee | ||
Comment 5•10 years ago
|
||
+nit fix
Assignee: nobody → dclarke
Attachment #8360892 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8366155 -
Flags: review+
Assignee | ||
Comment 6•10 years ago
|
||
Andrew, Possibly the mach command would read in a specific wifi file and pass it to the command line ? I just wasn't sure we needed an entire file for what will probably be a small json object.. https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/gaia-ui-tests/Gaia_UI_Tests_Run_Tests#How_to_configure_WiFi_using_testvars.json_%28for_devices%29 The gaia ui tests use a configuration file which passes the same type of object into the test harness. The documentation is usually on mdn for this type of feature ? Maybe a follow up bug for documentation?
Keywords: checkin-needed
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/31993b8e06cc
Keywords: checkin-needed
Comment 8•10 years ago
|
||
This was backed out in: https://hg.mozilla.org/integration/mozilla-inbound/rev/5041c3109c5a
Assignee | ||
Comment 9•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=22d013be7e55
Assignee | ||
Comment 10•10 years ago
|
||
Ran this through emulator, and seems fine now. Removed some defunk permissions from the manifest.webapp Added the proxy configuration piece in there as well to make the patch complete.
Attachment #8366155 -
Attachment is obsolete: true
Attachment #8367194 -
Flags: review?(ahalberstadt)
Comment 11•10 years ago
|
||
Comment on attachment 8367194 [details] [diff] [review] Bug_959499.patch Review of attachment 8367194 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, lgtm.. as long as you are sure those permissions are deprecated :)
Attachment #8367194 -
Flags: review?(ahalberstadt) → review+
Comment 12•10 years ago
|
||
Comment on attachment 8367194 [details] [diff] [review] Bug_959499.patch Review of attachment 8367194 [details] [diff] [review]: ----------------------------------------------------------------- Actually, just noticed that try run is busted, something is up.
Attachment #8367194 -
Flags: review+ → review-
Comment 13•10 years ago
|
||
JSON.parse probably doesn't like when we pass None into it.
Comment 14•10 years ago
|
||
Also for future, you can use the try syntax 'try: -b o -p emulator -u mochitest-1 -t none' to only run emulator mochitests. In this case, it's the b2g desktop mochitests that have broken so you'd use 'try: -b o -p linux64_gecko -u mochitest -t none' See http://trychooser.pub.build.mozilla.org/ for help building syntax.
Assignee | ||
Comment 15•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=df0c473829d7 Re-ran the broken tests with the updated patch. Added a check for wifiSettings prior to attempting to Parse. The default value for wifiSettings is False not None as well.
Attachment #8367194 -
Attachment is obsolete: true
Attachment #8368083 -
Flags: review?(ahalberstadt)
Comment 16•10 years ago
|
||
Comment on attachment 8368083 [details] [diff] [review] Bug_95499.patch Review of attachment 8368083 [details] [diff] [review]: ----------------------------------------------------------------- I think you attached the wrong patch. The one in try looks good, but this one still doesn't check for wifiSettings first. ::: testing/mochitest/b2g_start_script.js @@ +85,5 @@ > + let manager = navigator.mozWifiManager; > + let con = manager.connection; > + if(wifiSettings) { > + if (manager.enabled) { > + manager.associate(wifiSettings); nit: trailing whitespace @@ +87,5 @@ > + if(wifiSettings) { > + if (manager.enabled) { > + manager.associate(wifiSettings); > + } else { > + manager.onenabled = function () { nit: trailing whitespace
Attachment #8368083 -
Flags: review?(ahalberstadt)
Assignee | ||
Comment 17•10 years ago
|
||
unsure how that happened ? let me try again
Assignee | ||
Comment 18•10 years ago
|
||
problem found, incorrect patch
Attachment #8368083 -
Attachment is obsolete: true
Attachment #8368185 -
Attachment is obsolete: true
Attachment #8368192 -
Flags: review?(ahalberstadt)
Comment 19•10 years ago
|
||
Comment on attachment 8368192 [details] [diff] [review] Bug_959499.patch Review of attachment 8368192 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! And try run looks good too.
Attachment #8368192 -
Flags: review?(ahalberstadt) → review+
Comment 21•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b8784894c96
Keywords: checkin-needed
Comment 22•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7b8784894c96
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•