Bug 1807268 - Re-enable verifyShowClipboardSuggestionsToggleTest UI test r=jajohnson
[gecko.git] / js / xpconnect / mach_commands.py
blob514bfcff6921385d22af5a72ce3f679643e5554b
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 import argparse
6 import sys
7 from pathlib import Path
9 from mach.decorators import Command, CommandArgument
12 @Command("xpcshell", category="misc", description="Run the xpcshell binary")
13 @CommandArgument(
14 "args", nargs=argparse.REMAINDER, help="Arguments to provide to xpcshell"
16 def xpcshell(command_context, args):
17 dist_bin = Path(command_context._topobjdir, "dist", "bin")
18 browser_dir = dist_bin / "browser"
20 if sys.platform == "win32":
21 xpcshell = dist_bin / "xpcshell.exe"
22 else:
23 xpcshell = dist_bin / "xpcshell"
25 command = [
26 str(xpcshell),
27 "-g",
28 str(dist_bin),
29 "-a",
30 str(browser_dir),
33 if args:
34 command.extend(args)
36 return command_context.run_process(
37 command,
38 pass_thru=True,
39 ensure_exit_code=False,