def configuration_options(): return [ optparse.make_option( "-t", "--target", default=config.Config( executive.Executive(), filesystem.FileSystem()).default_configuration(), dest="configuration", help="(DEPRECATED) (default: %default)"), optparse.make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'), optparse.make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'), optparse.make_option( '--64-bit', action='store_const', const='x86_64', default=None, dest="architecture", help='use 64-bit binaries by default (x86_64 instead of x86)'), optparse.make_option( '--32-bit', action='store_const', const='x86', default=None, dest="architecture", help='use 32-bit binaries by default (x86 instead of x86_64)'), ]
def relay_path(self): if self._root_was_set: path = self._filesystem.abspath(self.get_option('root')) else: mac_config = port_config.Config(self._executive, self._filesystem, 'mac') path = mac_config.build_directory(self.get_option('configuration')) return self._filesystem.join(path, self.relay_name)
def configuration_options(): return [ optparse.make_option( "-t", "--target", default=config.Config( executive.Executive(), filesystem.FileSystem()).default_configuration(), dest="configuration", help="(DEPRECATED) (default: %default)"), optparse.make_option('--debug', action='store_const', const='Debug', dest="configuration", help='Set the configuration to Debug'), optparse.make_option('--release', action='store_const', const='Release', dest="configuration", help='Set the configuration to Release'), optparse.make_option( '--64-bit', action='store_const', const='x86_64', default=None, dest="architecture", help='use 64-bit binaries by default (x86_64 instead of x86)'), optparse.make_option( '--32-bit', action='store_const', const='x86', default=None, dest="architecture", help='use 32-bit binaries by default (x86 instead of x86_64)'), optparse.make_option('--arm', action='store_const', const='arm64e', default=None, dest="architecture", help='Use arm64e binaries by default'), optparse.make_option( '--architecture', action='store', default=None, dest="architecture", help='Use binaries of the specified architecture by default.'), # FIXME https://bugs.webkit.org/213677: This should effect the models used by simulator ports optparse.make_option('--model', action='store', default=None, dest="model", help='Override the model details on upload.'), ]
def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None, stderr='', port_implementation=None): e = MockExecutive2(output=output, exit_code=exit_code, exception=exception, run_command_fn=run_command_fn, stderr=stderr) fs = MockFileSystem(files) return config.Config(e, fs, port_implementation=port_implementation)
def __init__(self, *args, **kwargs): super(IOSSimulatorPort, self).__init__(*args, **kwargs) self._architecture = self.get_option('architecture') if not self._architecture: self._architecture = 'x86_64' self._leak_detector = LeakDetector(self) if self.get_option("leaks"): # DumpRenderTree slows down noticably if we run more than about 1000 tests in a batch # with MallocStackLogging enabled. self.set_option_default("batch_size", 1000) mac_config = port_config.Config(self._executive, self._filesystem, 'mac') self._mac_build_directory = mac_config.build_directory(self.get_option('configuration')) self._testing_device = None
def test_default_configuration__standalone(self): # FIXME: This test runs a standalone python script to test # reading the default configuration to work around any possible # caching / reset bugs. See https://bugs.webkit.org/show_bug.cgi?id=49360 # for the motivation. We can remove this test when we remove the # global configuration cache in config.py. e = Executive() fs = FileSystem() c = config.Config(e, fs) script = WebKitFinder(fs).path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'port', 'config_standalone.py') # Note: don't use 'Release' here, since that's the normal default. expected = 'Debug' args = [sys.executable, script, '--mock', expected] actual = e.run_command(args).rstrip() self.assertEqual(actual, expected)
def relay_path(self): mac_config = port_config.Config(self._executive, self._filesystem, 'mac') return self._filesystem.join( mac_config.build_directory(self.get_option('configuration')), self.relay_name)