This has now been merged to central. I've update the docs at:
https://developer.mozilla.org/en-US/docs/Mochitest
https://developer.mozilla.org/en-US/Firefox_OS/Automated_testing/Mochitests

In most cases just running |mach mochitest path/to/test/or/dir| will do
what you want. But if for some reason you need to restrict tests to a
specific flavor or subsuite, you can use --flavor (-f) or --subsuite
respectively.

E.g:
|mach mochitest-plain| becomes |mach mochitest -f plain|

Bug 1122590 is also fixed, so running |mach mochitest browser/devtools|
should now work. To exactly mimic the old |mach mochitest-devtools|
command, you'd use:
|mach mochitest -f browser --subsuite devtools|

Trying to run one of the old removed commands will print out a helpful
error message that provides examples using the new syntax.

If you have questions or things aren't quite working as expected, please
let me know.

-Andrew

On 13/05/15 03:54 PM, Andrew Halberstadt wrote:
As mentioned previously in another post, work is under way to remove
the flavor specific mochitest commands (e.g mach mochitest-plain,
mach mochitest-browser etc.). This is being tracked in bug 1164597
[1]. Bug description pasted below:

As part of an effort to make running tests as easy and intuitive
as possible, I'd like to consolidate all of the mochitest-<flavor>
mach commands into the single |mach mochitest| command.

Currently |mach mochitest| will automatically detect the flavor of
mochitests you wish to run. If you specify a directory that
contains multiple flavors, each flavor will be run in sequence. For
example:

./mach mochitest dom/indexedDB

runs all the mochitest-chrome, mochitest-browser-chrome and
mochitest-plain tests in that directory. The flavor can be limited
by passing in -f (--flavor). So to only run the chrome tests in
that directory you'd use:

./mach mochitest -f chrome dom/indexedDB

Commands of the form |mach mochitest-<flavor>| will be removed:

./mach mochitest-plain -> ./mach mochitest -f plain ./mach
mochitest-browser -> ./mach mochitest -f browser etc..

I believe this will make running tests easier and more intuitive.
The fact that different flavors of mochitest exist will become a
background implementation detail. Instead, an emphasis will be
placed on running directories of tests, or tests related to
certain features. The knowledge of which test belongs to which
flavor will no longer be required, but of course the ability to run
specific flavors will still be there for those who need it.

The described behaviour for |mach mochitest| above, already exists
today. This bug is about making it the defacto way to run
mochitests (maybe aside from |mach test|). This bug will also add
b2g and android support to |mach mochitest|.

Exceptions to this will be robocop, webapprt-chrome and
webapprt-content which for technical reasons will not be rolled
into |mach mochitest| (for now).


Please let me know if you have any questions or concerns, -Andrew

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1164597

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to