Make the test paths relative to topsrcdir before passing them to
TestResolver. Also do not passing cwd to TestResolver since it will
filter out tests that do not live under the directory where the mach
command is executed.
Verification steps:
Execute a mach test command from any subdirectory. For example:
$ cd testing/tps/
$ ../../mach xpcshell-test ../../services/fxaccounts/tests/xpcshell/
$ ../../mach test ../../services/fxaccounts/tests/xpcshell/
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):
- Never set the buffer's mode.
Years ago, Emacs did not have a good JavaScript mode, so it made sense
to use Java or C++ mode in .js files. However, Emacs has had js-mode for
years now; it's perfectly serviceable, and is available and enabled by
default in all major Emacs packagings.
Selecting a mode in the -*- file variable line -*- is almost always the
wrong thing to do anyway. It overrides Emacs's default choice, which is
(now) reasonable; and even worse, it overrides settings the user might
have made in their '.emacs' file for that file extension. It's only
useful when there's something specific about that particular file that
makes a particular mode appropriate.
- Correctly propagate settings that establish the correct indentation
level for this file: c-basic-offset and js2-basic-offset should be
js-indent-level. Whatever value they're given should be preserved;
different parts of our tree use different indentation styles.
- We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
Remove tab-width: settings, at least in files that don't contain tab
characters.
- Remove js2-mode settings that belong in the user's .emacs file, like
js2-skip-preprocessor-directives.
Similar to the previous patch, we now teach `mach mochitest` how to
execute test objects directly.
--HG--
extra : rebase_source : b69b5b74bcf6c81cff5deb28a1156ab2fcc691f7
`mach mochitest` now accepts a --flavor argument to limit execution to
tests of a certain flavor. Executing `mach mochitest --flavor=X` should
be equivalent to executing `mach mochitest-X`.
This paves the road to deprecating the various `mach mochitest-X`
commands.
--HG--
extra : rebase_source : 0f8370425f54a4ec86e7f668bcbff69362e017f7
The `mach mochitest` command is now implemented. Given test path
arguments, it will identify mochitests of any flavor and run the
appropriate mochitest suite.
If tests from multiple suites are present, it will invoke each suite
separately. Although, the output in this mode isn't very friendly.
There are a number of enhancements that could be made to this command,
including the abilities to filter by flavor and sub-suite. These will
come in another patch.
--HG--
extra : rebase_source : 9be6000e6bb508ef0c980eda9f9ebe03a4c0f02a
The MochitestOptions class has a class-local definition of the options
going into the optparse instance. The default values for these options
would be reused by subsequent consumers. In the case of the profile
path, the same temporary directory would be used. In the case of list
arguments, subsequent runs would inherit members added by earlier runs.
This patch should make subsequent runs free from the baggage of the
first.
--HG--
extra : rebase_source : c55a229e67515a9133377404344872ad0935a637