mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1855674 - Setup talos pdf toolchain artifact locally. r=aglavic,perftest-reviewers
This patch adds some code to pull in the toolchain artifact that contains the talos pdfs to test into the local mozbuild/state folder. Differential Revision: https://phabricator.services.mozilla.com/D205822
This commit is contained in:
parent
d2ae027d99
commit
e31ee2c46f
@ -12,6 +12,7 @@ import sys
|
||||
|
||||
import six
|
||||
from mach.decorators import Command
|
||||
from mach.util import get_state_dir
|
||||
from mozbuild.base import BinaryNotFoundException, MozbuildObject
|
||||
|
||||
HERE = os.path.dirname(os.path.realpath(__file__))
|
||||
@ -82,6 +83,7 @@ class TalosRunner(MozbuildObject):
|
||||
"win32": "python3.manifest",
|
||||
"win64": "python3_x64.manifest",
|
||||
},
|
||||
"mozbuild_path": get_state_dir(),
|
||||
}
|
||||
|
||||
def make_args(self):
|
||||
@ -117,6 +119,16 @@ def create_parser():
|
||||
return create_parser(mach_interface=True)
|
||||
|
||||
|
||||
def setup_toolchain_artifacts(args, command_context):
|
||||
if not any(arg.lower() == "pdfpaint" for arg in args):
|
||||
return
|
||||
|
||||
from mozbuild.bootstrap import bootstrap_toolchain
|
||||
|
||||
print("Setting up pdfpaint PDFs...")
|
||||
bootstrap_toolchain("talos-pdfs")
|
||||
|
||||
|
||||
@Command(
|
||||
"talos-test",
|
||||
category="testing",
|
||||
@ -127,7 +139,9 @@ def run_talos_test(command_context, **kwargs):
|
||||
talos = command_context._spawn(TalosRunner)
|
||||
|
||||
try:
|
||||
return talos.run_test(sys.argv[2:])
|
||||
args = sys.argv[2:]
|
||||
setup_toolchain_artifacts(args, command_context)
|
||||
return talos.run_test(args)
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user