summaryrefslogtreecommitdiffstats
path: root/testing/talos/mach_commands.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /testing/talos/mach_commands.py
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/talos/mach_commands.py')
-rw-r--r--testing/talos/mach_commands.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/testing/talos/mach_commands.py b/testing/talos/mach_commands.py
index c685219422..0b15af7a2c 100644
--- a/testing/talos/mach_commands.py
+++ b/testing/talos/mach_commands.py
@@ -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