Commit Graph

57 Commits

Author SHA1 Message Date
Tom Prince
ef2f3feb68 Bug 1563671: [tryselect] Adjust expectations of mach try empty test to include TRY_SELECTOR; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D37074

--HG--
extra : moz-landing-system : lando
2019-07-05 18:04:09 +00:00
Tom Prince
770166e1f5 Bug 1562287: Allow setting other try_task_config settings than templates; r=ahal
Templates invoke the `morph` logic, which is somewhat confusing and inflexible.
Update the machinery to support setting other `try_task_config` values.

Differential Revision: https://phabricator.services.mozilla.com/D36364

--HG--
extra : moz-landing-system : lando
2019-07-04 06:25:18 +00:00
Tom Prince
225b100443 Bug 1562287: Factor out generation of try_task_config; r=ahal
Factor out the logic for calculating `try_task_config` from `push_to_try`,
so it can be called only for those selectors that need it.

Differential Revision: https://phabricator.services.mozilla.com/D36363

--HG--
extra : moz-landing-system : lando
2019-07-04 06:25:11 +00:00
Geoff Brown
105f46a3c6 Bug 1250737 - Update android mozharness 'chunked' handling, for jittest; r=bc
It turns out there are several places where the change to suite 'jittest-chunked'
causes problem. I am abandoning that approach.
Desktop uses this trick, and this returns android '-chunked' handling to a state
similar to what it was before I started messing around!

Differential Revision: https://phabricator.services.mozilla.com/D28897

--HG--
extra : moz-landing-system : lando
2019-04-25 21:17:59 +00:00
Geoff Brown
450e774300 Bug 1546922 - Update tryselect unit test name for android jittest; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D28836

--HG--
extra : moz-landing-system : lando
2019-04-25 13:46:48 +00:00
Andrew Halberstadt
48648a7344 Bug 1523303 - Align mozharness suite names with the ones in 'moztest.resolve', r=gbrown
This officially makes 'moztest.resolve' the source of truth when it comes to
suite names. It aligns that file with the names used in both the
desktop_unittest and android_emulator_unittest scripts.

Differential Revision: https://phabricator.services.mozilla.com/D27555

--HG--
extra : moz-landing-system : lando
2019-04-22 22:32:34 +00:00
Andrew Halberstadt
14be9536c1 Bug 1523303 - [taskgraph] Define suite "categories" rather than flavours task configs, r=gbrown
Currently we have the concept of a "suite" and a "flavour" in our task
configuration.  Typically, the "suite" refers to the high-level test harness
like "mochitest" or "reftest", whereas the flavour is more specific, e.g
"browser-chrome-instrumentation" or "crashtest". However the line between suite
and flavour is not applied with any semblance of consistency which results in
inconsistent naming throughout the tree.

This patch gets rid of the concept of "flavours" entirely (at least when it
comes to task configuration). A suite is a type of test run, for example:

    - mochitest-plain
    - mochitest-devtools-chrome
    - mochitest-browser-chrome-instrumentation
    - jsreftest
    - reftest
    - firefox-ui-functional-remote
    etc

There is no confusion here between suites and flavours because flavours don't
exist. However, there are a couple of places where we *do* need to know what
"test harness" is used to run a suite. These cases are:

    1. For SCHEDULES moz.build rules
    2. For the desktop_unittest.py mozharness script which takes arguments like
       --mochitest-suite=browser (this is not a compelling use of this information
       and should be refactored to work more like the android_emulator_unittest.py
       script)

So to get this information, this patch introduces a new concept of a "category"
which is the overall "test harness" that runs the suite. For many suites, the
"category" is identical to the suite name. Unlike flavours, "categories" have
no bearing on how we call or refer to the suite.

Differential Revision: https://phabricator.services.mozilla.com/D27554

--HG--
extra : moz-landing-system : lando
2019-04-22 20:44:01 +00:00
Andrew Halberstadt
a35fbb3478 Bug 1546100 - [tryselect] Fix tools/tryselect/test/test_fuzzy.py, r=jmaher
This was regressed by bug 1544816 but the test never ran on the push that regressed.
This patch also updates the 'files-changed' for the tryselect task.

Differential Revision: https://phabricator.services.mozilla.com/D28386

--HG--
extra : moz-landing-system : lando
2019-04-22 18:38:58 +00:00
Andrew Halberstadt
6b482c7f2e Bug 1541527 - Remove "-e10s" from treeherder group symbols and task labels, r=jmaher,gbrown
Since e10s is the default configuration, we shouldn't explicitly mark things
with the "-e10s" suffix. Instead we should mark things that *don't* run with
'e10s. This patch removes '-e10s' from all treeherder group symbols and task
labels, adds the "-1proc" suffix to tasks that are non-e10s.

Differential Revision: https://phabricator.services.mozilla.com/D25958

--HG--
extra : moz-landing-system : lando
2019-04-15 18:18:33 +00:00
Mike Shal
623a6ff7d0 Bug 1543663 - Add $HOME/.mozbuild/fzf/bin to PATH for tryselect cramtests; r=ahal
This helps run the tests locally if fzf is normally installed in
$HOME/.mozbuild. Since the tests set MOZBUILD_STATE_PATH to a temporary
directory, fzf_bootstrap() can't find fzf in the HOME location unless it
is added to PATH.

Differential Revision: https://phabricator.services.mozilla.com/D27194

--HG--
extra : moz-landing-system : lando
2019-04-12 22:48:38 +00:00
Geoff Brown
cea888163f Bug 1318091 - Add Android 7.0 gtest tasks; r=bc
Add Android 7.0 gtests, opt and debug, running against the geckoview
TestRunnerActivity.

Differential Revision: https://phabricator.services.mozilla.com/D27016

--HG--
extra : moz-landing-system : lando
2019-04-11 20:49:33 +00:00
Andrew Halberstadt
a47c68c32c Bug 1523303 - [tryselect] Extend test_mozharness_integration.py to include the 'android_emulator_unittest' script, r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D26133

--HG--
extra : moz-landing-system : lando
2019-04-08 14:34:59 +00:00
Andrew Halberstadt
99da408e98 Bug 1523303 - [mozharness] Remove definitions for defunct *-addons suites, r=gbrown
Depends on D25432

Differential Revision: https://phabricator.services.mozilla.com/D25433

--HG--
extra : moz-landing-system : lando
2019-03-29 18:48:05 +00:00
Andrew Halberstadt
152788c6ab Bug 1523303 - [tryselect] Also read mac/win_unittest.py configs in test_mozharness_integration.py, r=gbrown
There are a few windows/mac-only suites that were missed since we were only
reading the linux variant.

Depends on D25401

Differential Revision: https://phabricator.services.mozilla.com/D25432

--HG--
extra : moz-landing-system : lando
2019-03-29 18:47:48 +00:00
Andrew Halberstadt
6c4d83431a Bug 1539957 - [fuzzy] Fix |mach try --preset foo -xq bar| when running a preset, r=jgraham
While running presets + intersection queries works with 'mach try fuzzy
--preset <foo>', it is still broken with 'mach try --preset <foo>'.

Differential Revision: https://phabricator.services.mozilla.com/D25298

--HG--
extra : moz-landing-system : lando
2019-03-29 13:27:34 +00:00
Andrew Halberstadt
574b9b89ea Bug 1523303 - [tryselect] Define 'mozharness_name' key in relevant TEST_SUITE definitions, r=gbrown
Some of these were working with the '<flavor>-<subsuite>' mechanism that was
previously being used, but better to be explicit wherever possible.

Depends on D25077

Differential Revision: https://phabricator.services.mozilla.com/D25078

--HG--
extra : moz-landing-system : lando
2019-03-27 18:42:48 +00:00
Andrew Halberstadt
5d91672933 Bug 1523303 - [mozharness] Normalize '-chunked' out of suite name when reading MOZHARNESS_TEST_PATHS in desktop_unittest.py, r=gbrown
Mozharness appends -chunked/-coverage to some suites, but the build system/test
resolver don't have any concept of these things. We need to normalize these out
for the purposes of MOZHARNESS_TEST_PATHS.

Differential Revision: https://phabricator.services.mozilla.com/D25015

--HG--
extra : moz-landing-system : lando
2019-03-27 15:59:55 +00:00
Andrew Halberstadt
573782c2eb Bug 1523303 - [tryselect] Add test making sure |mach try fuzzy <path>| generates suite names that mozharness recognizes, r=gbrown
It turns out bug 1489100 regressed the ability to specify test paths for most
suites by naively assuming that mozharness uses suite names that look like:

<flavor>-<subsuite>

In reality, there is no consistency to how suite names are generated. This test
does a few things:

1) Patches the moztest.TestResolver to return a list of all possible
suites/subsuites (assuming the lists in moztest.resolve are up to date).

2) Finds all the suites defined in the mozharness configs (e.g
linux_unittest.py), and uses these are parametrized inputs.

3) Checks that for each test suite,
DesktopUnittest._get_mozharness_test_paths() returns something.

I've marked all of the test suites that currently fail as expected. This way I
have a good sense of what needs to be fixed, and can validate my changes as I
move through the list.

Differential Revision: https://phabricator.services.mozilla.com/D25014

--HG--
extra : moz-landing-system : lando
2019-03-27 15:55:31 +00:00
Andrew Halberstadt
422288906f Bug 1530038 - [tryselect] Move taskgraph cache to new srcdir state location, r=tomprince
Depends on D24187

Differential Revision: https://phabricator.services.mozilla.com/D24188

--HG--
extra : moz-landing-system : lando
2019-03-20 15:33:56 +00:00
Andrew Halberstadt
20deb1451e Bug 1530038 - [tryselect] Use target_task_set instead of target_task_graph, r=tomprince
The graph contains some extra things like toolchains, fetches and packaging
tasks that people will almost never want to run on their own. This change gets
them out of the default fuzzy selection interface, and makes it so --full is
needed to schedule them.

Differential Revision: https://phabricator.services.mozilla.com/D24187

--HG--
extra : moz-landing-system : lando
2019-03-20 19:16:38 +00:00
Andrew Halberstadt
15fdaae87b Bug 1534375 - Fix intermittent failure in tools/tryselect/test/test_presets.py, r=gbrown
This makes sure this test doesn't actually generate tasks.

Differential Revision: https://phabricator.services.mozilla.com/D23132

--HG--
extra : moz-landing-system : lando
2019-03-13 14:53:26 +00:00
Andrew Halberstadt
a6193bafa0 Bug 1533043 - [chooser] Add a test for |mach try chooser|, r=gbrown
Depends on D22785

Differential Revision: https://phabricator.services.mozilla.com/D22788

--HG--
extra : moz-landing-system : lando
2019-03-12 13:49:25 +00:00
Andrew Halberstadt
ea09d14bd4 Bug 1533770 - [fuzzy] Fix query intersection when running presets with multiple queries, r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D22741

--HG--
extra : moz-landing-system : lando
2019-03-12 19:33:36 +00:00
Andrew Halberstadt
6df1fbd570 Bug 1533474 - [fuzzy] Fix paths with |mach try fuzzy|, r=gbrown
This fixes a regression from bug 1531886 and adds a test.

Differential Revision: https://phabricator.services.mozilla.com/D22575

--HG--
extra : moz-landing-system : lando
2019-03-08 00:12:41 +00:00
Andrew Halberstadt
6ee8586201 Bug 1531360 - [fuzzy] Add ability to intersect queries, r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D22028

--HG--
extra : moz-landing-system : lando
2019-03-06 16:14:00 +00:00
Andrew Halberstadt
db5e67fdae Bug 1531886 - [tryselect] Delete template context from kwargs, r=gbrown
When we parse template arguments, we stuff them all in kwargs['templates'],
however we don't delete the old argument. This results in all kinds of unused
variables lying around in kwargs. E.g we would have both
kwargs['templates']['env'] and kwargs['env'] (the latter being unused). This is
the main reason why all the selector's run functions need to have a **kwargs at
the end of them.

Depends on D22022

Differential Revision: https://phabricator.services.mozilla.com/D22023

--HG--
extra : moz-landing-system : lando
2019-03-05 23:49:22 +00:00
Andrew Halberstadt
fae875eee3 Bug 1531886 - [tryselect] Use consistent 'run' method to kickstart all selectors, r=gbrown
This allows us to refactor mach_commands.py so we can call self.handle_presets
implicitly. This in turn gives us a future place to add shared code and makes
adding new selectors easier.

Differential Revision: https://phabricator.services.mozilla.com/D22021

--HG--
extra : moz-landing-system : lando
2019-03-06 17:34:44 +00:00
Andrew Halberstadt
30fa8f8a4c Bug 1513951 - [tryselect] Implement in-tree try_presets.yml file r=gbrown
This creates a global preset file at:
tools/tryselect/try_presets.yml

Any presets defined here will be available for everyone to use.

Differential Revision: https://phabricator.services.mozilla.com/D21435

--HG--
extra : moz-landing-system : lando
2019-02-28 21:38:26 +00:00
Andrew Halberstadt
91456de750 Bug 1518572 - [tryselect] Migrate old preset files to the new format r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D20524

--HG--
extra : moz-landing-system : lando
2019-02-22 23:25:54 +00:00
Andrew Halberstadt
5caae33416 Bug 1518572 - [tryselect] Store all arguments when saving a preset r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D20523

--HG--
rename : taskcluster/taskgraph/util/templates.py => tools/tryselect/util/dicttools.py
extra : moz-landing-system : lando
2019-02-25 19:47:29 +00:00
Andrew Halberstadt
66888b2e2c Bug 1526129 - Fix test failure in tryselect cram tests, r=jmaher
This fixes a regression from bug 1483228. It started printing a message to
stdout whenever the local state dir was generated. This caused a failure in
these cramtests since they depend on the stdout of the shell process being
identical.

To fix, make sure we trigger state dir creation in the setup script and
redirect to /dev/null.

Differential Revision: https://phabricator.services.mozilla.com/D19155

--HG--
extra : moz-landing-system : lando
2019-02-08 15:17:26 +00:00
Andrew Halberstadt
4222e67eac Bug 1400426 - [try] Add --exact argument to |mach try fuzzy|, r=jgraham
Passing in --exact reverses the behaviour of the ' operator. For example,
take the query "foo 'bar".

By default: foo is a fuzzy match and bar is an exact match.
With --exact: foo is an exact match and bar is a fuzzy match

Differential Revision: https://phabricator.services.mozilla.com/D16734

--HG--
extra : moz-landing-system : lando
2019-01-30 17:09:34 +00:00
Andrew Halberstadt
c8b2301a9f Bug 1517621 - [tryselect] Mock out entire vcs object in python tests, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D15695

--HG--
extra : moz-landing-system : lando
2019-01-04 10:40:35 +00:00
Marco Castelluccio
a2850b812e Bug 1512146 - Update expected results for some tests using mach try fuzzy. r=ahal
--HG--
extra : rebase_source : 4cf706b219126f90b11c2e17f0401d82fe228aa5
2018-12-04 22:54:36 -05:00
Marco Castelluccio
a1348d373a Bug 1512082 - Add TRY_SELECTOR env to templates expected value. r=me
--HG--
extra : rebase_source : 498a3f1162ab15157ce553db9b38b4218a81ef48
2018-12-04 17:42:41 -05:00
Marco Castelluccio
65ca4461a5 Bug 1489100 - Specify tests per suite in MOZHARNESS_TEST_PATHS. r=ahal
--HG--
extra : rebase_source : 09d05ca38ad25ce6178172e607ce0207525ea484
2018-11-15 17:54:13 +01:00
Andrew Halberstadt
78d1bf89f0 Bug 1509048 - [tryselect] Pass full taskgraph into selectors, r=marco
Currently selectors that generate the taskgraph receive a list of task labels
back. While this works, it isn't very robust and limits the selectors in what
they can accomplish.

For example, it means we need to use regexes to map test suites to tasks. If
we had the full taskgraph, we could use filter functions instead.

There are also new selectors in the works which will need this (like ./mach
try chooser). Finally the try syntax selector would also need this if we
ever migrate it to use the 'try_task_config.json' format.

Differential Revision: https://phabricator.services.mozilla.com/D12570

--HG--
extra : moz-landing-system : lando
2018-11-23 18:17:33 +00:00
Tudor-Gabriel Vîjială
3546d45bf6 Bug 1429463 - Prototype ./mach try coverage tool. r=ahal,marco
--HG--
rename : tools/tryselect/test/test_fuzzy.py => tools/tryselect/test/test_tasks.py
2018-11-13 11:17:01 +01:00
Rob Wood
1dfcab1a30 Bug 1502922 - Add --gecko-profile flag support to mach try fuzzy for raptor and talos jobs; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D10114

--HG--
rename : taskcluster/taskgraph/templates/talos-profile.yml => taskcluster/taskgraph/templates/gecko-profile.yml
extra : moz-landing-system : lando
2018-10-30 15:15:32 +00:00
Tom Prince
e13a780a70 Bug 1497575: [staging-release] Fix tryselect tests for changed json formatting; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D9153

--HG--
extra : moz-landing-system : lando
2018-10-19 13:28:50 +00:00
Tudor-Gabriel Vîjială
1c6dbcaf24 Bug 1474869 - Fix mach try fuzzy when using multiple source checkouts. r=ahal
MozReview-Commit-ID: Dz9EOClembh

--HG--
extra : rebase_source : 2d82cd4f2aa86df5052023f1bbd912162bdb2a84
2018-08-06 11:36:09 +01:00
Andrew Halberstadt
0e4eda282f Bug 1471990 - Implement |mach try again| to repeat your last 'try_task_config.json' try push r=gbrown
One of the big downsides to |mach try fuzzy| is that if you use the interactive
finder, there's no way to repeat your last action. If you want to run the same
push again, you have to manually re-select all the same tasks a second time.

It is possible to save presets, but this is fairly heavy-weight and (more)
permanent. Sometimes you just want to re-run a push a few times and forget
about it. It's also possible to craft the query on the command line with -q,
but then you don't get the immediate visual feedback, so you can't be sure that
you typed out the right things without actually pushing.

With |mach try again|, everytime you generate a try_task_config.json via
'fuzzy', 'empty' or any other subcommands that may exist in the future, it'll
get stored in a history file under ~/.mozbuild. Then running |mach try again|
will simply re-run the most recent try_task_config.json.

You'll also be able to view the whole history via |mach try again --list| and
select a specific try_task_config.json (i.e not the most recent one) via
|mach try again --index <index>|.

Example usage will be:
$ ./mach try fuzzy
<select a bunch of tasks>
$ ./mach try again
<re-pushes exact same set of tasks>

MozReview-Commit-ID: 3EZjVCy08uq

Depends on D1808.

Differential Revision: https://phabricator.services.mozilla.com/D1867

--HG--
extra : moz-landing-system : lando
2018-07-16 13:35:30 +00:00
Andrew Halberstadt
9435736ade Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt
This will make sure that when running |mach python-test --python 3| locally,
we only run the tests that also run in CI with python 3 (and therefore pass
presumably).

MozReview-Commit-ID: 3OBr9yLSlSq

--HG--
extra : rebase_source : 456340d0ecdddf1078f2b5b4ebb1eddf3813b26a
2018-06-27 11:10:02 -04:00
Andrew Halberstadt
4984a86e83 Bug 1464419 - [tryselect] Ability to specify --query multiple times with |mach try fuzzy| r=jmaher
Currently it's possible to specify a single query and take the union of terms with the '|'
symbol. However if you want to craft anything more complicated (i.e linux mochitest and
xpcshell, but windows reftest), it becomes really difficult. This allows developers to union
the result of multiple queries.

For example:
./mach try fuzzy -q "'linux 'mochitest | 'xpschell" -q "'windows 'reftest"

Differential Revision: https://phabricator.services.mozilla.com/D1838
2018-06-26 22:08:07 +00:00
Andrew Halberstadt
135003aa80 Bug 1414921 - Add --geckoProfile to capture profiles from talos tasks to |mach try fuzzy|, r=dustin
Enables |./mach try fuzzy --talos-profile|. This template only applies to talos
tasks. It also provides --geckoProfile for consistency with |mach try syntax|,
but I don't like this name so it's hidden from the help.

The 'talos-profile.yml' template is also very specific (only applies to Talos
tasks).  Ideally I'd like a general 'command.yml' template that just appends
arguments to the command for any arbitrary tasks. But then we'd need to invent
an expression syntax in try_task_config.json so we could make sure it only
applies to Talos. Then I thought rather than implement it for a specific
template, we should have a general way of doing this which could apply to any
and all of the templates.

Needless to say, it's a rabbit hole and something that's best left to a
follow-up so we don't delay this bug.

MozReview-Commit-ID: GhllZ7sr0ar

--HG--
extra : rebase_source : 1de4deecc2f73130904d7c95d4ff12f85883cd91
2017-12-13 16:16:09 -05:00
Andrew Halberstadt
3087b17a69 Bug 1413928 - [tryselect] Implement paths for |mach try fuzzy| r=maja_zf
This enables the syntax like:
./mach try fuzzy dom/indexedDB

This will open up the fzf interface like normal, except only tasks
that have tests under dom/indexedDB will be selectable (and there
will only be one chunk per configuration).

This can be combined with -q/--query like normal:
./mach try fuzzy dom/indexedDB -q "!pgo !cov !asan"

When the tasks get scheduled, only the tests under the specified
path(s) will run within the harness.

MozReview-Commit-ID: IHRXXi5mB4G

--HG--
extra : rebase_source : 8a89f255591e6dfa31b1420196c4698f2015d10c
2017-11-15 16:36:07 -05:00
Andrew Halberstadt
9b0698e9b6 Bug 1413928 - [tryselect] Add a new 'path' template r=maja_zf
This sets the MOZHARNESS_TEST_PATHS environment variables for all tasks.
When specifying paths, this will cause many test tasks to only run the
tests under that directory as opposed to the normal default.

MozReview-Commit-ID: IHRXXi5mB4G

--HG--
extra : rebase_source : e7132311641f4d36a5bff56424988fbb3ae87238
2018-01-15 16:05:37 -05:00
Andrew Halberstadt
28b0ebdf63 Bug 1413928 - [tryselect] Change templates to return an entire context dict instead of a single value r=maja_zf
This changes templates so they return an entire context dict instead of
only returning context based on their name. For example, now the 'path'
template can set context for 'env'.

A side effect of this is that there is no longer a 1-to-1 mapping of templates
in tryselect and taskgraph.

MozReview-Commit-ID: IHRXXi5mB4G

--HG--
extra : rebase_source : 4d7e398e60598a5de7961fb126f1d05a0b983681
2018-01-15 16:05:17 -05:00
Andrew Halberstadt
24922a65ba Bug 1413928 - [tryselect] Add python unittest for templates r=davehunt
This makes use of pytest's generation feature. To add a new
template test, just add a new entry containing the input and
expected output to the dict in test_templates.py

MozReview-Commit-ID: 4qMefYHMjAp

--HG--
extra : rebase_source : ba3049885d1a2485048e1ff9913be43317559376
2017-11-21 10:11:00 -05:00
Andrew Halberstadt
22eb565843 Bug 1413374 - [tryselect] Fix |mach try empty| regression and add a test, r=armenzg
MozReview-Commit-ID: Iv2RDqqhL57

--HG--
extra : rebase_source : c609fea4ff27766027fb072bd7c778f3884a1d46
2017-11-01 08:12:42 -04:00