Bug 1929458 - support setting OS version to use in failure annotations generated by skip-fails. r=jmaher

Differential Revision: https://phabricator.services.mozilla.com/D228513
This commit is contained in:
Sebastian Hengst 2024-11-11 21:20:51 +00:00
parent abf63ced1d
commit f2df1ff64c
2 changed files with 18 additions and 2 deletions

View File

@ -1252,6 +1252,12 @@ def manifest(_command_context):
action="store_true",
help="Use implicit variables in reftest manifests",
)
@CommandArgument(
"-n",
"--new-version",
dest="new_version",
help="New version to use for annotations",
)
def skipfails(
command_context,
try_url,
@ -1266,6 +1272,7 @@ def skipfails(
verbose=False,
dry_run=False,
implicit_vars=False,
new_version=None,
):
from skipfails import Skipfails
@ -1284,7 +1291,14 @@ def skipfails(
max_failures = -1
Skipfails(
command_context, try_url, verbose, bugzilla, dry_run, turbo, implicit_vars
command_context,
try_url,
verbose,
bugzilla,
dry_run,
turbo,
implicit_vars,
new_version,
).run(
meta_bug_id,
save_tasks,

View File

@ -158,6 +158,7 @@ class Skipfails(object):
dry_run=False,
turbo=False,
implicit_vars=False,
new_version=None,
):
self.command_context = command_context
if self.command_context is not None:
@ -171,6 +172,7 @@ class Skipfails(object):
self.try_url = try_url
self.dry_run = dry_run
self.implicit_vars = implicit_vars
self.new_version = new_version
self.verbose = verbose
self.turbo = turbo
if bugzilla is not None:
@ -1084,7 +1086,7 @@ class Skipfails(object):
if os == "macosx":
os = "mac"
if "version" in platform_os:
os_version = platform_os["version"]
os_version = self.new_version or platform_os["version"]
if len(os_version) == 4:
os_version = os_version[0:2] + "." + os_version[2:4]
if "build" in platform_os: