Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PSA: Use multi-line skip statements in test manifests

2 views
Skip to first unread message

Andrew Halberstadt

unread,
Nov 9, 2020, 10:04:56 AM11/9/20
to to...@lists.mozilla.org, Sheriffs, releng
Hey folks,

Just sending a PSA to a few lists that are likely to spend time editing
test manifests. With bug 1675319
<https://bugzilla.mozilla.org/show_bug.cgi?id=1675319>, manifestparser
based manifests (mochitest, xpcshell, marionette, etc.) can support
multi-line skip-if statements.

So instead of:

[test_foo.js]
skip-if = (os == "win" && debug) || (os == "android") || (os == "linux"
&& fission) # Bug 1234567, Bug 123458, Bug 1234569

Please use:

[test_foo.js]
skip-if =
os == "win" && debug # Bug 1234567
os == "android" # Bug 1234568
os == "linux" && fission # Bug 1234569

Each line of the skip-if is implicitly joined by OR. Having one line per
"issue" will make it easy to identify which part of the skip-if is relevant
to which bug / reason comment. In the future we may even add a way to have
the bug number / reason skipped hardcoded into the actual metadata (rather
than as a comment), so it can be queried by tooling.

Multi-line skips were technically possible before by using trailing `||`
symbols, but it only worked by a fluke and was very rarely used in
practice. This old way of doing it will now result in a failure.

Cheers,
Andrew
0 new messages