def add_options(self, parser): # add profile options MozRunnerCLI.add_options(self, parser) parser.add_option('--list-sets', dest='list_sets', action='store_true', help="List the available sets and exit.")
from mozhttpd import MozHttpd import json import socket import threading import os import sys import shutil import tempfile from datetime import datetime from mozbuild.base import MozbuildObject from buildconfig import substs PORT = 8888 if __name__ == '__main__': cli = CLI() debug_args, interactive = cli.debugger_arguments() build = MozbuildObject.from_environment() httpd = MozHttpd(port=PORT, docroot=os.path.join(build.topsrcdir, "build", "pgo")) httpd.start(block=False) locations = ServerLocations() locations.add_host(host='127.0.0.1', port=PORT, options='primary,privileged') #TODO: mozfile.TemporaryDirectory profilePath = tempfile.mkdtemp() try:
from mozfile import TemporaryDirectory from mozhttpd import MozHttpd from mozprofile import FirefoxProfile, Preferences from mozprofile.permissions import ServerLocations from mozrunner import FirefoxRunner, CLI from six import string_types PORT = 8888 PATH_MAPPINGS = { '/js-input/webkit/PerformanceTests': 'third_party/webkit/PerformanceTests', } if __name__ == '__main__': cli = CLI() debug_args, interactive = cli.debugger_arguments() runner_args = cli.runner_args() build = MozbuildObject.from_environment() binary = runner_args.get('binary') if not binary: binary = build.get_binary_path(where="staged-package") path_mappings = { k: os.path.join(build.topsrcdir, v) for k, v in PATH_MAPPINGS.items() } httpd = MozHttpd(port=PORT, docroot=os.path.join(build.topsrcdir, "build", "pgo"),