Commit Graph

131 Commits

Author SHA1 Message Date
Andrew Halberstadt
7bf5cc987c Bug 1445975 - Add a basic mach command for running jsshell benchmarks, r=jmaher
Run with:
./mach jsshell-bench ares6

This requires a non-artifact build with ac_add_options --enable-js-shell. Otherwise,
a custom JS shell can be specified with --binary.

MozReview-Commit-ID: C8WAxG9pIkk
2018-05-15 14:41:16 -04:00
Jan de Mooij
5ded69bd07 Bug 1063728 - Run SpiderMonkey style checkers as part of the build instead of make check. r=chmanchester 2018-04-26 09:09:51 +02:00
Jan de Mooij
a319264521 Bug 1064316 part 3 - Fix |mach check-spidermonkey| to use correct cwd. r=gps 2018-04-24 16:17:50 +02:00
Andrew Halberstadt
571df9c911 Bug 1445624 - [test] Make sure verbose logging is enabled when running a single test, r=gbrown
This sets verbose=True (used by the mach formatter) and compact=False (used by tbplformatter) if
only a single test is specified with either |mach test| or |mach mochitest|.

This way all TEST_STATUS and log lines will be visible when developers are writing a new test.

MozReview-Commit-ID: 2nuKs9DLnx0
2018-03-19 16:04:02 -04:00
Andrew Halberstadt
3f49b69f08 Bug 1443557 - Start using the 'mach' formatter by default in |mach test| and |mach mochitest|, r=gbrown
This was originally supposed to be fixed in bug 1421799, but I either forgot to
switch the flag, or accidentally clobbered it while resolving conflicts.

MozReview-Commit-ID: Im8OKbswEf0
2018-03-12 16:46:53 -04:00
Andrew Halberstadt
0fdbf21c01 Bug 1440405 - Fix faulty assumption that only one log handler can be installed in |mach test/mochitest|, r=froydnj
MozReview-Commit-ID: AzKLAgW5agx
2018-02-23 09:40:06 -05:00
Andrew Halberstadt
86db9106de Bug 1437912 - [moztest] Map flavors and subsuites to a suite definition, r=gbrown
The end goal here is to be able to use |mach try fuzzy <path>| with tests that
belong to a subsuite. To do this, we need a unique 'task_regex' value for each
subsuite so that we can map a test path back to a set of tasks.

This removes the TEST_FLAVORS dict (which was mostly just a redefinition of the
data in TEST_SUITES), and instead provides two new private mappings:

<flavor> -> suite definition
(<flavor>, <subsuite>) -> suite definition

To retrieve a suite definition given a flavor/subsuite, consumers can now call
get_suite_definition.

MozReview-Commit-ID: 2pe1v1IHUVy
2018-02-13 14:16:46 -05:00
Andrew Halberstadt
dda26b5280 Bug 1421799 - [test] Add mozlog logging arguments to |mach test| and |mach mochitest| r=gbrown
MozReview-Commit-ID: CaysVHzNTWo
2017-12-06 17:29:23 -05:00
Sebastian Hengst
5199c70807 Backed out 5 changesets (bug 1421799) for failing firefox ui functional tests. r=backout on a CLOSED TREE
Backed out changeset f9f32474fdaf (bug 1421799)
Backed out changeset 18b4fa241936 (bug 1421799)
Backed out changeset 88dca5c8cfac (bug 1421799)
Backed out changeset 8c1f1ab754a5 (bug 1421799)
Backed out changeset e028f677bc80 (bug 1421799)
2018-01-03 20:21:28 +02:00
Andrew Halberstadt
64cabfbe8c Bug 1421799 - [test] Add mozlog logging arguments to |mach test| and |mach mochitest| r=gbrown
MozReview-Commit-ID: CaysVHzNTWo
2017-12-06 17:29:23 -05:00
Dorel Luca
3f52976726 Backed out 5 changesets (bug 1421799) for failing browser-chrome on Linux and OSX and for failing autophone-mochitest on Android r=backout on a CLOSED TREE
Backed out changeset 7fb20bced076 (bug 1421799)
Backed out changeset 629e467a07be (bug 1421799)
Backed out changeset 2de335c0287a (bug 1421799)
Backed out changeset afe14ec646ab (bug 1421799)
Backed out changeset bbe4d2292f86 (bug 1421799)
2017-12-14 15:41:22 +02:00
Andrew Halberstadt
5494a0c2b7 Bug 1421799 - [test] Make the 'mach' formatter the default when running |mach test| and |mach mochitest| r=gbrown
MozReview-Commit-ID: 17ENkMhLTYc
2017-12-06 14:13:40 -05:00
Andrew Halberstadt
7a378095f5 Bug 1421799 - [test] Add mozlog logging arguments to |mach test| and |mach mochitest| r=gbrown
MozReview-Commit-ID: CaysVHzNTWo
2017-12-06 17:29:23 -05:00
Andrew Halberstadt
1a29f62a2b Bug 1209463 - [mozlog] Add a 'summary_on_shutdown' attribute to MachFormatter, r=jgraham
When 'summary_on_shutdown' is True (which is the case for |mach test| and |mach
mochitest|), BaseSummaryFormatters will save the summary information until the
'shutdown' action is received at the end of the logger's lifetime.

Summary information will no longer be dumped on 'suite_end'.

MozReview-Commit-ID: HKtVr5PxfOy
2017-11-29 12:02:19 -05:00
Andrew Halberstadt
d29f3e4728 Bug 1209463 - [test] Use a common logger across suites from |mach test| and other test commands, r=gbrown
In order for |mach test| and |mach mochitest| to log an overall summary,
every test harness invocation they make needs to use the same structured
logger (otherwise the affected suite will be missing from the summary).

MozReview-Commit-ID: 8LJw7r8SItk
2017-11-23 13:04:19 -05:00
Sebastian Hengst
52ea9f8769 merge mozilla-inbound to mozilla-central. r=merge a=merge 2017-11-09 00:00:16 +02:00
Geoff Brown
12b77a6c82 Bug 1414960 - Improve formatting of |mach test-info| output; r=jmaher 2017-11-08 09:32:09 -07:00
Andrew Halberstadt
fc16543844 Bug 1414399 - [moztest] Refactor |mach test|'s resolving logic into moztest.resolve r=gps
The code in |mach test| for test resolving, should get merged with the TestResolver
class in moztest.resolve. This way it can be shared with other modules and we'll
have a single canonical place for all our test resolving logic.

MozReview-Commit-ID: IHRXXi5mB4G
2017-11-08 09:59:51 -05:00
Andrew Halberstadt
2730a80a6b Bug 1414399 - [mozbuild/moztest] Move mozbuild.testing.TestResolver to moztest.resolve r=gps
The TestMetadata and TestResolver classes aren't technically part of the build
system. The only connection is that they consume some build system output.

The next patch in this series is going to be merging in a bunch of other test
resolving logic from other parts of the tree. Moving this out first allows us
to keep that extra logic out of mozbuild.

MozReview-Commit-ID: 1eq4SjFVCyW
2017-11-06 08:41:42 -05:00
Attila Craciun
3285ac9374 Merge inbound to mozilla-central r=merge a=merge 2017-10-25 12:30:28 +03:00
Geoff Brown
3bdc012091 Bug 1410714 - Help mach tests find adb when running Android tests; r=jmaher 2017-10-24 15:17:25 -06:00
Gregory Szorc
b87de58e47 Bug 1410969 - Consolidate code for resolving path metadata; r=ahal
find_paths_and_tags() can instantiate a BuildReader to read moz.build
metadata. We switch `mach test` to call this to avoid some redundant
code.

To facilitate `mach try`'s use case, we add test flavors to the
result of find_paths_and_metadata() and change the function name to
reflect its more generic purpose.

MozReview-Commit-ID: Lcz05W8g2dt
2017-10-23 10:42:41 -07:00
Gregory Szorc
d576ec80a3 Bug 1410969 - Return dict from find_paths_and_tags(); r=ahal
This will make the return value more easily extensible and will help
consumers know what the data structures represent.

MozReview-Commit-ID: DaeYsqfMW37
2017-10-23 10:36:38 -07:00
Gregory Szorc
35724b3915 Bug 1410969 - Properly import AutoTry; r=ahal
The AutoTry code got moved around in 27b5181a3c77 and c94bf66df122
(bug 1382775). This broke `mach test` without arguments.

This commit imports the new location and uses the new API. As the
inline TODO states, there is still room for improvement. This will
be done in a separate commit.

MozReview-Commit-ID: AKHfdNnfOhl
2017-10-23 10:33:37 -07:00
Kris Maglione
051a41c813 Bug 1371065: Part 1 - Remove external references to the add-on SDK. r=Mossop,glandium
MozReview-Commit-ID: D5KyHcg8Ujk
2017-09-12 11:54:47 -07:00
Gregory Szorc
dc0f4784a9 Bug 1397406 - Use BuildReader helper in mach test; r=dustin
Now that we have a helper function to obtain a BuildReader, let's
put it to use.

MozReview-Commit-ID: 7V3RsWs5TPu
2017-09-06 12:26:15 -07:00
Andrew Halberstadt
8322dc4a7e Bug 1289444 - Forward extra arguments in |mach test| to the underlying test commands, r=chmanchester
MozReview-Commit-ID: 631K2n0wB1a
2017-08-29 16:20:47 -04:00
Andrew Halberstadt
812890c6d3 Bug 1311991 - Add a basic cramtest mach command, r=gps
This is a pretty bad runner. My goal for now is to get something really
basic working and then improve it over time as more tests get added.

Run tests with:
./mach cramtest path/to/dir

Any extra args will be forwarded to the cram binary, e.g:
./mach cramtest -i path/to/dir

Cram help can be seen with:
./mach python -m cram -- -h

MozReview-Commit-ID: 67jYHfYQjWu
2017-01-20 11:15:25 -05:00
Andrew Halberstadt
07c0f2531e Bug 1311991 - Add testing/mach_commands.py to flake8 linter, r=gps
This was mostly generated with autopep8 v1.3.2. A few left over errors
were fixed by hand.

MozReview-Commit-ID: 5crfUz0xj3O
2017-08-17 15:50:39 -04:00
Gregory Szorc
9d978f16ec Bug 1384665 - Use virtualenv Python in mach check-spidermonkey; r=jimb
Recent changes in bug 1377216 introduced some new Python imports
to some SpiderMonkey test scripts. These modules likely won't be on
sys.path by default.

To ensure these Python processes always work, this commit changes
them to be executed with the Python binary from the build system's
virtualenv.

In the case of jit_test.py and jstests.py, we switch from relying on
the shebang Python (`/usr/bin/env python`). In other cases, we switch
from mach's python (essentially `which python2.7` or `python`).
Previously, some clients may have been using Python 3 via shebang
discovery. This change will force them to Python 2. This might be
unfortunate. But proper Python 3 support in mach and the build system
is a bit of a mess right now. I'd rather we just consistently use
the virtualenv Python because it is more well-defined and it
eliminates a class of bugs around the Python environment being
undefined.

MozReview-Commit-ID: 4NHzWisIgDC
2017-07-26 18:02:51 -07:00
Andrew Halberstadt
17bb4f21d5 Bug 1382775 - Move testing/tools/autotry to tools/tryselect/selectors/syntax.py, r=chmanchester
The |mach try| implementation isn't really testing specific so figured while doing this refactor
anyway we could take the opportunity to move it to /tools. This renames the "autotry" module to
"syntax" as one of the 'selectors' under the newly created tryselect module.

MozReview-Commit-ID: DmnGU5sKuCk
2017-07-17 21:36:23 -04:00
Geoff Brown
cb76e6845f Bug 1371833 - In 'mach test-info', use posix paths for queries; r=jmaher 2017-06-21 13:59:28 -06:00
Andrew Halberstadt
8a700d5b56 Bug 1368438 - Add -j to mach try, r=chmanchester
The -j try syntax specifies a "job" task. Job tasks are different from
unittests in that they typically don't require a build and run from the
source tree. Examples include linters (eslint, flake8, etc), python tests
(mozbase, mochitest, etc) and misc things like doc generation.

Sometimes, developers might only want to run a specific "job" task with a
syntax like "./mach try -j mozbase".

This means a few assumptions need to be broken in |mach try|. Platforms
and unittests should no longer be required if -j was specified. Most of
the changes in this patch revolve around dealing with those broken
assumptions.

MozReview-Commit-ID: O0y6V2Wwej
2017-06-15 08:14:22 -04:00
Andrew Halberstadt
1dceb6b951 Bug 1368438 - Make it possible to only schedule builds with |mach try|, r=chmanchester
Currently if no unittests, paths or tags are specified it will error out.

MozReview-Commit-ID: O0y6V2Wwej
2017-06-15 08:14:17 -04:00
Geoff Brown
691359814e Bug 1365621 - Allow specification of info categories for |mach test-info|; r=jmaher 2017-05-17 10:30:37 -06:00
Geoff Brown
a8b501f361 Bug 1365621 - Display manifest info in |mach test-info|; r=jmaher 2017-05-17 10:30:36 -06:00
Geoff Brown
3b0903218b Bug 1365621 - Allow multiple test arguments for |mach test-info|; r=jmaher 2017-05-17 10:30:34 -06:00
Geoff Brown
b72a74a2a6 Bug 1340584 - Remove devicemanagerSUT and references to sutagent; r=wlach
sutagent is no longer built or used; devicemanagerSUT is completely
unused. After this change, devicemanagerADB is the only implementation of
devicemanager, and test harness options like --dm_trans are eliminated.
2017-03-21 12:20:01 -06:00
Geoff Brown
2e3233acdf Bug 1345572 - Enhance 'mach test-info' with total and worst failure rates; r=jmaher 2017-03-08 16:01:44 -07:00
Chris Manchester
fd8656158a Bug 1344281 - Don't accidentally require config.status when running |./mach try|. r=nalexander
MozReview-Commit-ID: Ez8GI46kv7z
2017-03-03 11:17:11 -08:00
Chris Manchester
7a5c51cdd3 Bug 1344117 - Always print a message when adding --artifact to a try push automatically. r=nalexander
MozReview-Commit-ID: 7pVIG4v7DHq
2017-03-02 21:21:52 -08:00
Nick Alexander
b856c3a4d1 Bug 1315032 - Make |mach try| set --artifact flag when --enable-artifact-builds is set. r=chmanchester
Tri-state flags: I hate them.  I don't want to default "--artifact" in
the autotry parser, since not all consumers of that code have a
mozconfig.  However, we also can't overwrite the `artifact` value from
a "--no-artifact" flag without knowing if we're changing anything.
Therefore, we add a new "--no-artifact" flag and manage the tri-state
ourselves.

MozReview-Commit-ID: 19gl3mM4YO0
2016-11-20 14:31:52 -08:00
Andrew Halberstadt
bb2379e136 Bug 1342937 - Error out of |mach try| when using test paths and no build config is detected, r=chmanchester
MozReview-Commit-ID: 2RE3vc1Kxvc
2017-02-27 09:42:25 -05:00
Geoff Brown
7324a744db Bug 1324470 - Add support for |mach test-info|; r=gps,ekyle
The test-info command provides a report of test results for a named
test on a set of branches over a time period. Test results include
a pass/fail summary, average/min/max duration, and open bugs.
Branches and time period can be modified with optional parameters.
2017-02-07 09:42:29 -07:00
Ryan VanderMeulen
69c29674a5 Bug 1263230 - Remove in-tree references to IPC/OOP reftest modes. r=ahal 2016-11-07 08:59:49 -05:00
Wes Kocher
763c6f1628 Backed out changeset 6c32452df00e (bug 1238305) for cpp test failures a=backout 2016-11-02 12:18:58 -07:00
Aaron Klotz
6b26d06d6d Bug 1238305: Modify cppunittests to look up breakpad symbols for logged stack traces; r=ted
MozReview-Commit-ID: LnqEVRqYYFZ
2016-01-12 12:58:59 -07:00
Chris Manchester
8a7e61e6ba Bug 1313716 - Don't provide a blank subsuite as a default in the manifestparser. r=ahal
This causes consumers managing defaults themselves to fail to find a default
subsuite for tests, because the manifestparser will have provided a blank
default value by the time they incorporate defaults into a test definition.
This patch removes the provided defaults and updates a number of places assuming
the 'subsuite' field is always present.

MozReview-Commit-ID: 1jPy52VmEPr
2016-10-31 10:04:42 -07:00
Kris Maglione
247e5c5860 Backed out changeset 425c0602ccb4 (bug 1313716) for breaking mach mochitest. r=backout
MozReview-Commit-ID: pTW1acQYLV
2016-10-30 19:17:13 -07:00
Chris Manchester
168be1651b Bug 1313716 - Don't provide a blank subsuite as a default in the manifestparser. r=ahal
This causes consumers managing defaults themselves to fail to find a default
subsuite for tests, because the manifestparser will have provided a blank
default value by the time they incorporate defaults into a test definition.
This patch removes the provided defaults and updates a number of places assuming
the 'subsuite' field is always present.

MozReview-Commit-ID: 1jPy52VmEPr
2016-10-28 11:07:21 -07:00