Closed
Bug 920184
Opened 11 years ago
Closed 11 years ago
mach xpcshell-test should automatically ensure test files are up to date
Categories
(Testing :: XPCShell Harness, defect)
Testing
XPCShell Harness
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla27
People
(Reporter: gps, Assigned: gps)
References
(Blocks 1 open bug)
Details
(Whiteboard: [mozbase])
Attachments
(1 file, 1 obsolete file)
4.94 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
Now that test files are installed via install manifests (bug 901990), we should now be able to have the mach command(s) for running tests automatically ensure test files are up to date before running them.
Let's prototype this with the xpcshell command.
mach has a facility to invoke other mach commands. We could probably make the xpcshell-test command invoke |mach build install-tests| with NO_REMOVE=1 in the environment (to prevent removals).
Updated•11 years ago
|
Whiteboard: [mozbase]
Assignee | ||
Comment 1•11 years ago
|
||
Patch should be mostly self-explanatory.
The rules in Makefile.in are such that if an xpcshell.ini or moz.build
is updated, we'll perform a moz.build traversal. So, the developer
edit-test loop with this patch should "just work."
Attachment #809381 -
Flags: review?(ted)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gps
Assignee | ||
Comment 3•11 years ago
|
||
Now with mochitest command goodness.
I moved the logic for installing tests into a new class. I've been
warning to create a high-level "build API" class for a while. This patch
is my excuse.
Attachment #812061 -
Flags: review?(ted)
Assignee | ||
Updated•11 years ago
|
Attachment #809381 -
Attachment is obsolete: true
Attachment #809381 -
Flags: review?(ted)
Comment 4•11 years ago
|
||
Comment on attachment 812061 [details] [diff] [review]
Have mach xpcshell-test automatically install test files
Review of attachment 812061 [details] [diff] [review]:
-----------------------------------------------------------------
::: python/mozbuild/mozbuild/controller/building.py
@@ +536,5 @@
> +
> +class BuildDriver(MozbuildObject):
> + """Provides a high-level API for build actions."""
> +
> + def install_tests(self, remove=True):
Seems a little weird that you have to override the default for remove every single place you invoke it.
::: testing/mochitest/mach_commands.py
@@ +579,4 @@
> self._ensure_state_subdir_exists('.')
>
> + driver = self._spawn(BuildDriver)
> + driver.install_tests(remove=False)
This repeated code feels like it wants to wind up in a decorator.
Attachment #812061 -
Flags: review?(ted) → review+
Assignee | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c689b1d342c7
I can see both comments. But, the default behavior of "install_tests" from the perspective of the build system is to delete untracked files. So, a default to remove from the Python API makes sense.
Once we have 100% coverage of _tests, we can remove the support for controlling removing from the API.
w.r.t. the repeated code, there is no common class for everything to inherit from. I'm not sure 2 lines is worth it.
Status: NEW → ASSIGNED
Flags: in-testsuite-
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
•