Commit Graph

234 Commits

Author SHA1 Message Date
andrej
80d11774cc Bug 1767567 - Resolve WPT intermittent fail Issue r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D145638
2022-05-06 13:34:28 +00:00
andrej
23829f29b7 Bug 1766009 - Create WPT chrome job r=perftest-reviewers,sparky,davehunt
Differential Revision: https://phabricator.services.mozilla.com/D144444
2022-05-04 17:10:39 +00:00
Mitchell Hentges
9cf588867c Bug 1764466: Fix perftest-test invocation of modern pytest r=perftest-reviewers,sparky
* There is no `--duration` argument, but there //is// `--durations`
* `pytest` behaves better when called via its main entry points (either
  `bin/pytest`, or `-m pytest`)

Differential Revision: https://phabricator.services.mozilla.com/D143609
2022-04-13 20:07:17 +00:00
andrej
6cbd9c7da7 Bug 1741975 - Have WPT tests available in taskcluster r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140843
2022-04-01 16:59:17 +00:00
Mitchell Hentges
14386d0c7e Bug 1717104: Activate virtualenv before running command r=perftest-reviewers,ahal,AlexandruIonescu
All commands declaring a virtualenv will have them activated before the
command executes. Removes all now-redundant manual activations of
declared virtualenvs.

Commands that don't declare a virtualenv will still implicitly be
associated with the "common" virtualenv, but unlike explicit
virtualenv declarations it'll have to be activated manually, just
like it was before this patch.

To smooth the migration with existing usages, virtualenv activation
behaviour was changed slightly: if attempting to activate a new
virtualenv, but the source venv is already command venv, then raise an
exception. (In the future, we should improve testability of
virtualenv scaffolding logic so that tests can be added for this
sort of thing.) This did cause some issues with some tests, which
will be solved more cleanly with bug 1724273. In the meantime,
minimal modifications were made to failing tests to keep them green:
* `test_command_line.py` was activating the `common` virtualenv so
  that it could install `mozproxy`, and use its CLI. Instead, I
  modified the test to use `mozproxy` using the "module" interface
  (`python -m mozproxy ...`). At that point, `MozbuildObject` was
  unnecessary and usages were replaced with simpler variants.
* `test_vendor.py` needed its explicit `activate_virtualenv()` call
  patched out. It still needs to use a virtualenv's Python
  executable, but due to `sys.executable` now being kept up-to-date
  as of bug 1717051, it could be used directly.

Differential Revision: https://phabricator.services.mozilla.com/D122892
2022-03-23 14:50:45 +00:00
andrej
950f616c3e Bug 1741971 - Add MozPerfTest Testing Section to WPT Layer r=perftest-reviewers,sparky
Depends on D133785

Differential Revision: https://phabricator.services.mozilla.com/D137459
2022-03-09 20:53:29 +00:00
andrej
c601667cc8 Bug 1741971 - Make MozPerfTest Layer to run WPT r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D133785
2022-03-09 20:44:48 +00:00
Alex Ionescu
4f07163ef9 Bug 1749967 - Automated recording for android r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D135891
2022-02-21 07:32:13 +00:00
Mitchell Hentges
e2438c91d3 Bug 1732795: Install coverage using pip r=ahal
`coverage` has native code, so the vendored version was only used as
source code from which the actual package could be built.
Since its always used in a context where we can `pip install` over the
network, let's do that. This cleans up our tree a bit and allows us to
leverage the `coverage` wheels.

Differential Revision: https://phabricator.services.mozilla.com/D138816
2022-02-18 14:27:18 +00:00
Gregory Mierzwinski
9f2451e841 Bug 1752871 - Add option to specify which page to record. r=perftest-reviewers,AlexandruIonescu
This patch adds the --proxy-perftest-page option. With this option, we'll be able to specify which test pages we want to record rather than modifying the pageload_sites.json. Note that the login fields will not be taken into consideration with this option.

You can use the flag as follows (seperate multiple pages with a comma): --proxy-perftest-page microsft,linkedin,netflix

Furthermore, some changes were made to strengthen the conditions around when a login site can be tested (only when RAPTOR_LOGINS is defined locally, or if we are in CI).

Differential Revision: https://phabricator.services.mozilla.com/D137468
2022-02-10 16:09:22 +00:00
Gregory Mierzwinski
34ba65f015 Bug 1753497 - Update browsertime for mozperftest to v14.1. r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D138005
2022-02-08 13:49:54 +00:00
Marian-Vasile Laza
d4e226ac2b Backed out changeset b0f8e402178c (bug 1753413) for causing perfdocs lint failures. CLOSED TREE 2022-02-03 21:36:02 +02:00
Sylvestre Ledru
a6fa94d220 Bug 1753413 - lint fix r=fix CLOSED TREE 2022-02-03 21:09:57 +02:00
Gregory Mierzwinski
313d80b9e9 Bug 1742103 - Update the browsertime version used by Mozperftest. r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D133910
2022-01-19 14:30:12 +00:00
Alex Ionescu
5327fad352 Bug 1741896 Accept/prevent first load prompts for CNN during automated recording r=perftest-reviewers,kimberlythegeek
Differential Revision: https://phabricator.services.mozilla.com/D131508
2022-01-03 07:12:51 +00:00
Mitchell Hentges
7836ac8a11 Bug 1744713: Manually add "xpcshell" to the sys.path for perftests r=sparky
Though _most_ of the old paths that used to be defined in
`mozperftest/runner.py` exist in `common_virtualenv_packages.txt`,
"xpcshell" was not because it's put in a different location depending on
whether the source directory is sourced from the "target.xpcshell.tests"
artifact or from VCS directly.

As part of this change, I've verified that all of the other
path changes in D132503 are fulfilled by the "mach" site.

Differential Revision: https://phabricator.services.mozilla.com/D133215
2021-12-15 16:29:00 +00:00
Kimberly Sereduck
52dc2b318b Bug 1744563: Add option to disable inject-deterministic script when recording page load r=perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D133100
2021-12-10 15:52:26 +00:00
Mitchell Hentges
59ed9dbf06 Bug 1743578: Activate Mach site in mozperftest/runner.py r=sparky
When activating a command virtualenv, it rightfully complains if it
isn't already running within an active Mach site - the abstraction has
restrictions to act as guardrails around the risky business that is
`sys.path` patching.

Replace `mozperftest/runner.py`'s ad-hoc `sys.path` initializing with
`MachSiteManager`'s `activate()` instead.

Removes the calls to `_setup_path()` where the `sys.path` should
already be set-up.

Differential Revision: https://phabricator.services.mozilla.com/D132503
2021-12-01 15:51:32 +00:00
Mitchell Hentges
6571032077 Bug 1739067: Scope Mach virtualenv to be checkout-specific r=perftest-reviewers,ahal,sparky
Build and run the Mach virtualenv from a `state_dir` that is
"specific-to-topsrcdir".

As part of this, move `get_state_dir()` to `mach` so that it's usable
before `sys.path` entries are fully set up.

Differential Revision: https://phabricator.services.mozilla.com/D130383
2021-11-29 22:33:54 +00:00
Gregory Mierzwinski
34cc45b193 Bug 1734466 - Increase testing resolution to 1280x1024. r=perftest-reviewers,AlexandruIonescu
This patch increases the viewport size/resolution to 1280x1024 in all of our desktop browsertime tests.

Differential Revision: https://phabricator.services.mozilla.com/D131607
2021-11-25 14:23:55 +00:00
Mitchell Hentges
b7b1442242 Bug 1730712: Remove external use of _run_pip() r=perftest-reviewers,ahal,sparky
As `_run_pip()` is being removed from `VirtualenvManager` in an upcoming
patch, its usages need to be removed. Besides, they're using an
"internal" function, which is a bit of a smell.

Note that this _could_ have been solved by exposing a public `run_pip()`
function. However, I felt like that was worse because:
* Friction here is good as we try to migrate the codebase to embrace the
  "requirements definition file" technique to install dependencies.
* There could be confusion about the relationship between
  `install_pip_package()` (only works if venv already activated)
  and `_run_pip()`, which works "in general".

Differential Revision: https://phabricator.services.mozilla.com/D130120
2021-11-16 21:14:41 +00:00
Mitchell Hentges
cdfd8d15eb Bug 1739124: Add new requirements to mozperftest r=perftest-reviewers,sparky
The logic to handle virtualenv requirements definitions now need to be
able to import `packaging` and `pyparsing` in order to parse the pip
requirement specifier notation.

Differential Revision: https://phabricator.services.mozilla.com/D130288
2021-11-03 19:50:24 +00:00
Mitchell Hentges
162c7ab422 Bug 1732946: Vendor pip/setuptools/wheel instead of installing into venv r=ahal
Now that are prioritizing system over virtualenv site-packages, the
system `pip` is sometimes being used instead.
This is causing issues when the system pip is set up in a
distro-specific way, such as when "debundled":
https://github.com/pypa/pip/blob/9.0.1/pip/_vendor/__init__.py#L53-L61

However, if we vendor `pip`, `setuptools` and `wheel`, and ensure that
they're prioritized in the `sys.path` before anything is imported from
the system, then we can ensure that we're using a modern `pip` _and_
sidestep system-specific pip weirdness.

Note that `pip-compile`'s `--allow-unsafe` flag is not as dangerous as
it sounds.
There's confusion among maintainers about its origin:
https://github.com/jazzband/pip-tools/issues/522
Additionally, it's going to be enabled by default in a future
`pip-tools` release. So, it's not scary for us to embrace here.

Also, heads up that the "pip outdated warning" no longer needs
to be manually silenced, since pip avoids that code path when
not running from an "installed" context.

Differential Revision: https://phabricator.services.mozilla.com/D127182
2021-11-01 21:34:03 +00:00
Michelle Goossens
8a15b54b15 Bug 1733684 - Move the win10-64-source jobs over to the new Win10 2004 Azure workers r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D128295
2021-10-27 11:33:17 +00:00
Myeongjun Go
212af2f1b2 Bug 1635183 - [mozperftest] Port browsertime log parsing to mozperftest r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D120242
2021-10-21 12:47:16 +00:00
Cosmin Sabou
770ddc2d26 Backed out changeset 3417336ac329 (bug 1733684) for causing windows startup failures and blocking nightlies. a=backout 2021-10-17 04:37:21 +03:00
Michelle Goossens
cc43051aeb Bug 1733684 - Move the win10-64-source jobs over to the new Win10 2004 Azure workers r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D128295
2021-10-16 14:03:52 +00:00
Mitchell Hentges
069a961b41 Bug 1723031: Associate perftest-test command with python-test venv r=ahal
The `pytest` dependency is going to be moved from `common` to the
`python-test` environment. Shift all existing `pytest` usages to
the virtualenv accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D126287
2021-09-28 20:21:38 +00:00
Alex Lopez
63022efc7a Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-27 18:12:51 +00:00
Butkovits Atila
eb735ac57e Backed out changeset 53b1fa0faa6d (bug 1696251) for breaking the static-analysis integration. a=backout 2021-09-23 13:06:40 +03:00
Alex Lopez
a8e7083c84 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-21 20:38:16 +00:00
Butkovits Atila
c06a3dd9fa Backed out changeset 510dd46a9de7 (bug 1696251) for causing Android build bustages. 2021-09-21 05:16:50 +03:00
Alex Lopez
fe61e94ec8 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-20 20:21:07 +00:00
Noemi Erli
91aa2e2b9c Backed out changeset 5f5b612878f3 (bug 1696251) for causing multiple bustages 2021-09-18 02:22:39 +03:00
Alex Lopez
bf860fe7dc Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-17 19:00:39 +00:00
Alex Lopez
77ce415604 Bug 1696251 - Replace self with command_context where possible in existing mach commands. r=mhentges,webdriver-reviewers,perftest-reviewers,whimboo
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D118058
2021-07-19 16:04:25 +00:00
Butkovits Atila
28088b069e Backed out changeset b533ae02d367 (bug 1705420) as requested by Kimberly. CLOSED TREE 2021-07-16 23:22:23 +03:00
Butkovits Atila
a07f790e42 Backed out changeset e1921c5112d8 (bug 1696251) for causing bustages complaining about 'CommandContext'. CLOSED TREE 2021-07-16 20:35:55 +03:00
Alex Lopez
190e03aaab Bug 1696251 - Replace self with command_context where possible in existing mach commands. r=mhentges,webdriver-reviewers,perftest-reviewers,whimboo
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D118058
2021-07-16 15:51:29 +00:00
surajeet310
1903d302ab Bug 1717651 - Removed instances of 'ensure_subprocess_env' from python/mozperftest r=mhentges
Since Python 2 is no longer used in python/mozperftest, hence 'ensure_subprocess_env' is obsolete.

Differential Revision: https://phabricator.services.mozilla.com/D119898
2021-07-14 16:33:46 +00:00
Kimberly Sereduck
210d1cc333 Bug 1705420: Report the version of the application being tested in our perfherder data r=perftest-reviewers,sparky
implementing get_browser_meta for mozperftest

Differential Revision: https://phabricator.services.mozilla.com/D113861
2021-07-13 12:13:38 +00:00
Florin Strugariu
2b3375937c Bug 1715478 - Automated recording for desktop with a list sites r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D117298
2021-07-09 07:12:27 +00:00
Mitchell Hentges
b7dde05a8d Bug 1717786: Update mozperfest runner's list of in-tree Python packages r=kimberlythegeek
After replacing a bunch of vendored source packages with wheels, the
paths to the raw source changed.

Differential Revision: https://phabricator.services.mozilla.com/D118723
2021-06-24 18:02:53 +00:00
Tarik Eshaq
453be8c6fd Bug 1716450 - Removes fxa-client rust code from Desktop. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D118238
2021-06-22 17:04:35 +00:00
Gregory Mierzwinski
a5873d50c0 Bug 1716378 - Use correct test modules path in xpcshell layer. r=perftest-reviewers,kimberlythegeek
Differential Revision: https://phabricator.services.mozilla.com/D117690
2021-06-15 17:01:58 +00:00
Mitchell Hentges
b685c830d4 Bug 1714684: Resolve assert_has_calls() usage error r=ahal
The `calls` parameter is expected to be an iterable
container of calls, not a singular call.

This was working in `mock-1.0.0` because `calls`
was (confusingly) allowed to be a single item
if `any_order==False`. This behaviour isn't
the same in the standard library.

Differential Revision: https://phabricator.services.mozilla.com/D117074
2021-06-14 15:34:47 +00:00
Mitchell Hentges
e389cc4cc4 Bug 1714684: Remove usages of vendored "mock" library r=perftest-reviewers,ahal,sparky
Python 3 has access to `unittest.mock` in the standard library.

Differential Revision: https://phabricator.services.mozilla.com/D117073
2021-06-14 15:34:46 +00:00
Greg Tatum
1a7c5a8df1 Bug 1714099 - Locally enable the console layer by default in perftest; r=sparky
This will only turn it on locally, but not when run in CI.

Differential Revision: https://phabricator.services.mozilla.com/D116655
2021-06-08 20:27:15 +00:00
Greg Tatum
e2b8e6c87b Bug 1713384 - Raise an exception when no perftest results are found; r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D116654
2021-06-08 20:27:15 +00:00
Florin Strugariu
39b334597c Bug 1702659 - Update mozperftest proxy service r=sparky,perftest-reviewers
Make mozperftest work with the new mozproxy command line
Add ability to run proxy on mobile browser
Add ability to use record and playback modes
Add unit tests

Differential Revision: https://phabricator.services.mozilla.com/D115544
2021-06-08 18:00:12 +00:00