This patch fixes an issue where the suite-level description error wasn't being output. Instead of using the manifest from the yaml for this error, we'll output the failure to all changed files. Some additional changes are made for mozperftest to handle tests with periods in their names.
Differential Revision: https://phabricator.services.mozilla.com/D227378
Wow, this one was fun to debug. I was attempting to write some Python
tests that wrap around mach.run and then validate the output (in order
to get rid of our cramtest framework). But I had an issue where any
tests that ran after an earlier test, would have the wrong arguments
set. It turns out that the earlier test hits a code path that calls into
Registrar.dispatch(). And this method is supposed to temporarily mutate
the defaults of the argument parser:
https://searchfox.org/mozilla-central/rev/0d0eef18ea91e38ddfb82a1ac5d6560a146da5c0/python/mach/mach/registrar.py#185
The problem is that it doesn't properly restore state. This is because
ArgumentParser.set_defaults mutates both, parser._defaults as well as
parser._actions (which themselves can have a default). So we need to
restore both of those. We also need to use deepcopy rather than copy or
it doesn't work. And for good measure I threw both of them into a
finally block in case parsing the arguments raises an exception that
would get caught and handled downstream (e.g a test that is testing
invalid arguments).
Differential Revision: https://phabricator.services.mozilla.com/D227679
This patch introduces performance tests to evaluate the video encoding
performance in two usage scenarios: *Realtime* and *Record*. Each
scenario assesses the encoding using two key metrics:
1. Frame Encoding Latency: The time from encoding a single frame to
receiving its encoded result
2. Total Encoding Time: The duration from the first encoding request to
the reception of the last encoded result
In the *Realtime* scenario, minimizing the latency for each frame is
crucial. This metric is essential for applications like live streaming
and video conferencing, where timely delivery of each frame impacts user
experience.
In contrast, the *Record* scenarios prioritizes the total encoding time.
Here, the focus is on processing the entire sequence efficiently to
produce the final output.
By adding these tests, we aim to thoroughly assess and optimize the
encoder's performance under both scenarios, ensuring Gecko provides the
experience users expect.
Differential Revision: https://phabricator.services.mozilla.com/D224999
Commands added:
`mach test fenix` runs all tests for fenix
`mach test focus` runs all tests for focus
`mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/TranslationsDialogBindingTest.kt` will run all tests in the file.
`mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/` will run all tests in the directory.
Differential Revision: https://phabricator.services.mozilla.com/D224885
Git requires a `-f` flag to force adding files that are captured by the
`.gitignore` (hg does not need this). We need this because of changes
in bug 1894160 that requires vendoring to explicitly add `.egg-info`
files due to `.gitignore` and `.hgignore` changes. Since they are
captured by this `.gitignore`, we need to be able to forcibly add them.
We add the `force` flag to all `add_remove_files` to allow us to append
that flag when running the `GitRepository` variant. They are unused for
all other variants, but we need to maintain a consistent function
signature.
Note: Also moved up the hash file regeneration to happen earlier so that
it is automatically added to VCS instead of having to be done manually.
Differential Revision: https://phabricator.services.mozilla.com/D226064
The latter was removed in python 3.13, and while it can be replaced with
shlex, we also have our own version that considers more characters as
needing quotes.
Differential Revision: https://phabricator.services.mozilla.com/D225329
This patch adds some documentation about the mach perftest alert layer, and how to use it. This includes the additional options that it has.
Differential Revision: https://phabricator.services.mozilla.com/D224006
We can continue using `-o` to generate the `requiriements.txt` file by just using the filename instead of the absolute path. This works because we're already setting the `cwd` to be where it needs to be generated. This makes the comment at the top of the generated `requirements.txt` file always be the same, regardless of who ran the vendor.
Differential Revision: https://phabricator.services.mozilla.com/D224508
googlesource only has a base64 encoded raw form, so this patch adds the facility
for a host to specify a function for the copy and decode from the temp download
file. It also allows the individual-files-default-upstream to be an empty str,
because it seems reasonable for a file to be relative to the base vendoring url.
Differential Revision: https://phabricator.services.mozilla.com/D223145