Closed
Bug 917055
Opened 11 years ago
Closed 11 years ago
Add mach target for running mochitests on B2G desktop build
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla27
People
(Reporter: jgriffin, Assigned: ahal)
References
Details
(Whiteboard: [mach])
Attachments
(2 files, 2 obsolete files)
(deleted),
patch
|
ahal
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
We should do this before we enable these tests in TBPL, since we'll have a lot more developer interest in them by that time, and they're difficult for people to run manually now.
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mach]
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•11 years ago
|
||
Note that Patch 1.1 adds the is_firefox condition to all normal mochitest commands so that they won't show up if a fennec or b2g_desktop build is currently active. I think this makes it less confusing (won't be inundated with 10+ mochitest commands, of which only one will actually work).
Attachment #806744 -
Flags: review?(gps)
Assignee | ||
Comment 2•11 years ago
|
||
Adds a mochitest-b2g-desktop command that will only be available if a b2g desktop build is active. Also suppresses the other mochitest commands in this case.
Attachment #806747 -
Flags: review?(jgriffin)
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 806747 [details] [diff] [review]
Patch 1.1 - create mach command for b2g desktop mochitests
Review of attachment 806747 [details] [diff] [review]:
-----------------------------------------------------------------
Cool, thanks! Just a couple of minor issues:
::: testing/mochitest/mach_commands.py
@@ +116,5 @@
>
> + options.consoleLevel = 'INFO'
> + if conditions.is_b2g_desktop(self):
> + options.desktop = True
> + options.app = self.get_binary_path()
For builds that contain both 'b2g' and 'b2g-bin', this returns 'b2g', but we want 'b2g-bin'. (Some builds only have 'b2g', in which case 'b2g' is appropriate.) If 'b2g-bin' exists and we use 'b2g', we'll end up using a build-in profile, which may cause some unexpected behaviors. So we should check for 'b2g-bin' and use that, if it exists.
@@ +126,5 @@
> + return 1
> +
> + if not options.profile:
> + print(GAIA_PROFILE_NOT_FOUND % 'mochitest-b2g-desktop')
> + return 1
It would be nice to add a check that the specified profile is not a DEBUG profile, which we can do by checking if the file $profile/extensions/httpd/httpd@gaiamobile.org exists or not (it exists for DEBUG profiles). This is one of the issues I ran into frequently at the work week, and mochitests will not run with a DEBUG profile.
Attachment #806747 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 4•11 years ago
|
||
I also added a warnings.catch_warnings() block to the import section as it can spew annoying messages if any of the modules (i.e mozbase) has already been imported somewhere else.
Attachment #806747 -
Attachment is obsolete: true
Attachment #806882 -
Flags: review+
Comment 5•11 years ago
|
||
Comment on attachment 806744 [details] [diff] [review]
Patch 1.0 - add mach conditions for firefox and b2g_desktop
Review of attachment 806744 [details] [diff] [review]:
-----------------------------------------------------------------
MOZ_APP_NAME can not be relied on because it changes between channels (Firefox, Nightly, Aurora, etc) and by the distributor. I think you want MOZ_BUILD_APP instead. It's the path of the Gecko application being built. e.g. browser, mobile/android.
Attachment #806744 -
Flags: review?(gps) → review-
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #806744 -
Attachment is obsolete: true
Attachment #807283 -
Flags: review?(gps)
Updated•11 years ago
|
Attachment #807283 -
Flags: review?(gps) → review+
Assignee | ||
Comment 7•11 years ago
|
||
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•