Files
tubestation/testing
Erich Gubler ff15810520 Bug 1959285 - test: improve diagnostic for missing test manifest base revision r=ahal
When `git log` is given an argument it doesn't recognize as a commit
hash in its database, it tries to resolve it as a path in the repository
at `HEAD`. If that doesn't refer to a path that exists, then it bails
with a fatal error at the ambiguity, like so:

```
fatal: ambiguous argument 'b56a9af51519d2e77e05efa672a13e6be2e9ebc': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error running mach:

┆   mach test dom/serviceworkers/test/test_serviceworker_interfaces.js
```

In the case of fetching a test manifest for, say, a `mach test`
invocation, this is unnecessarily confusing, because we intend a commit
hash. Improve the diagnostic emitted in this case using the `--`
argument suggested by Git CLI in the above message. This clarifies the
diagnostic to the following:

```
fatal: bad revision 'b56a9af51519d2e77e05efa672a13e6be2e9ebc'
Error running mach:

┆   mach test dom/serviceworkers/test/test_serviceworker_interfaces.js
```

Differential Revision: https://phabricator.services.mozilla.com/D244840
2025-04-11 01:44:33 +00:00
..

Common testing tools for mozilla codebase projects, test suite definitions
for automated test runs, tests that don't fit anywhere else, and other fun
stuff