gecko-dev/testing/mozharness
Nick Alexander 19d52d9edc Bug 1566174 - Part 2: Add browsertime dependencies to Raptor tasks when --browsertime flag is present. r=rwood,tomprince
This commit prepares the decks for turning specific Raptor tasks into
Raptor + browsertime tasks.  The `--browsertime` flag to `mach try
...` flips the switch; eventually, the Raptor harness will recognize
the `--browsertime` flag and use browsertime to perform the pageload
measurements.

To run browsertime, we need:

1) Node.js
2) the browsertime `node_modules` (provided by the
   `toolchain-browsertime` task)
3) ffmpeg (for producing videos from captured frames)
4) chromedriver (in the future, when targeting Chrome/Chromium)
5) geckodriver (provided by the `toolchain-*-geckodriver` tasks)
6) `PATH` configured

This commit arranges those things.

Since the configuration varies by test platform, and eventually we
expect the changes implemented by the flag to be moved into YAML task
definitions, we elect to use `by-test-platform` conditionals as much
as possible.  The end expression is pleasant, thanks to
`evaluate_keyed_by`.

Handling PATH, however, is a rabbit hole.  At this time, it's not
possible to use `fetch` task repackaging, because `releng-hardware`
doesn't support `zstandard` (Bug 1576244) and there's no appetite to
avoid `zstandard` entirely (Bug 1576698).  Generally PATH is
configured using `mozharness` configuration files, which can execute
arbitrary Python and configure the PATH only for browsertime jobs.
However, the Raptor mozharness script itself runs the Raptor harness
in a stripped down environment, throwing away modifications to PATH.
It's not clear what impacts changing that has, so we leave it alone,
and add a `--browsertime-ffmpeg` flag and custom handling in the
Raptor harness.  This can transition smoothly into a browsertime flag
(so that the PATH doesn't need to be set at all) and into a unified
interface for Raptor and `mach browsertime` to configure the
browsertime execution environment.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 18:53:49 +00:00
..
configs Bug 1577037 - Stop running all Fennec functional tests; r=bc 2019-09-04 15:58:36 +00:00
docs
examples
external_tools Bug 1561582 - tooltool.py now supports python 3 and 2 r=rail CLOSED TREE 2019-06-27 12:54:07 +00:00
mozharness Bug 1566174 - Part 2: Add browsertime dependencies to Raptor tasks when --browsertime flag is present. r=rwood,tomprince 2019-09-06 18:53:49 +00:00
scripts Bug 1575471 - Move `make check` from mozharness to moz-automation.mk. r=froydnj 2019-08-21 12:31:30 +00:00
test Bug 1554818 - [mozlog] Update StatusHandler to support known_intermittent field r=jgraham 2019-06-11 14:09:40 +00:00
LICENSE
README.txt
mach_commands.py Bug 1473498 - Fixing Py3 compatibility errors reachable from testing/mach_commands.py r=gbrown 2019-07-16 01:21:55 +00:00
moz.build Bug 1551208 - Update obsolete bug component. r=aki 2019-05-13 20:41:07 +00:00
requirements.txt
setup.cfg
setup.py
tox.ini Bug 1554818 - [mozlog] Update StatusHandler to support known_intermittent field r=jgraham 2019-06-11 14:09:40 +00:00
unit.sh

README.txt

# Mozharness

## Docs
* https://developer.mozilla.org/en-US/docs/Mozharness_FAQ
* https://wiki.mozilla.org/ReleaseEngineering/Mozharness
* http://moz-releng-mozharness.readthedocs.org/en/latest/mozharness.mozilla.html
* http://moz-releng-docs.readthedocs.org/en/latest/software.html#mozharness

## Submitting changes
Like any Gecko change, please create a patch or submit to Mozreview and
open a Bugzilla ticket under the Mozharness component:
https://bugzilla.mozilla.org/enter_bug.cgi?product=Release%20Engineering&component=Mozharness

This bug will get triaged by Release Engineering

## Run unit tests
To run the unit tests of mozharness the `tox` package needs to be installed:

```
pip install tox
```

There are various ways to run the unit tests. Just make sure you are within the `$gecko_repo/testing/mozharness` directory before running one of the commands below:

```
tox                            # run all unit tests
tox -- -x                      # run all unit tests but stop after first failure
tox -- test/test_base_log.py   # only run the base log unit test
```

Happy contributing! =)