def R(test): return gclient_factory.ShouldRunTest(tests, test)
def V8Factory(self, target='Release', clobber=False, tests=None, mode=None, slave_type='BuilderTester', options=None, compile_timeout=1200, build_url=None, project=None, factory_properties=None, target_arch=None, shard_count=1, shard_run=1, shell_flags=None, isolates=False, command_prefix=None): tests = tests or [] factory_properties = (factory_properties or {}).copy() # Automatically set v8_target_arch in GYP_DEFINES to target_arch. if not 'gclient_env' in factory_properties: factory_properties['gclient_env'] = {} gclient_env = factory_properties['gclient_env'].copy() factory_properties['gclient_env'] = gclient_env if 'GYP_DEFINES' in gclient_env: gclient_env['GYP_DEFINES'] += " v8_target_arch=%s" % target_arch else: gclient_env['GYP_DEFINES'] = "v8_target_arch=%s" % target_arch if (self._target_platform == 'win32'): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_WIN7SDK) if (gclient_factory.ShouldRunTest(tests, 'leak')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_VALGRIND) if (gclient_factory.ShouldRunTest(tests, 'mozilla')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA) if (gclient_factory.ShouldRunTest(tests, 'arm')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA) factory = self.BuildFactory(target=target, clobber=clobber, tests=tests, mode=mode, slave_type=slave_type, options=options, compile_timeout=compile_timeout, build_url=build_url, project=project, factory_properties=factory_properties, target_arch=target_arch) test_env = factory_properties.get('test_env', {}) test_options = factory_properties.get('test_options', []) # Get the factory command object to create new steps to the factory. # Note - we give '' as build_dir as we use our own build in test tools v8_cmd_obj = v8_commands.V8Commands(factory, target, '', self._target_platform, target_arch, shard_count, shard_run, shell_flags, isolates, command_prefix, test_env=test_env, test_options=test_options) if factory_properties.get('archive_build'): v8_cmd_obj.AddArchiveBuild( extra_archive_paths=factory_properties.get('extra_archive_paths')) # Add a trigger step if needed. self.TriggerFactory(factory, slave_type=slave_type, factory_properties=factory_properties) # Add all the tests. self._AddTests(v8_cmd_obj, tests, mode, factory_properties) return factory
def R(*testnames): for test in testnames: if gclient_factory.ShouldRunTest(tests, test): tests.remove(test) return True
def V8Factory(self, target='Release', clobber=False, tests=None, mode=None, slave_type='BuilderTester', options=None, compile_timeout=1200, build_url=None, project=None, factory_properties=None, target_arch=None, shard_count=1, shard_run=1, shell_flags=None, isolates=False): tests = tests or [] factory_properties = factory_properties or {} # Automatically set v8_target_arch in GYP_DEFINES to target_arch. if not 'gclient_env' in factory_properties: factory_properties['gclient_env'] = {} gclient_env = factory_properties['gclient_env'] if 'GYP_DEFINES' in gclient_env: gclient_env['GYP_DEFINES'] += " v8_target_arch=%s" % target_arch else: gclient_env['GYP_DEFINES'] = "v8_target_arch=%s" % target_arch if (self._target_platform == 'win32'): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_WIN7SDK) if (gclient_factory.ShouldRunTest(tests, 'v8_es5conform')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_ES5CONFORM) if (gclient_factory.ShouldRunTest(tests, 'sputnik')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SPUTNIK) if (gclient_factory.ShouldRunTest(tests, 'leak')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_VALGRIND) if (gclient_factory.ShouldRunTest(tests, 'mozilla')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA) if (gclient_factory.ShouldRunTest(tests, 'arm')): self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_MOZILLA) self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_SPUTNIK) self._solutions[0].custom_deps_list.append(self.CUSTOM_DEPS_ES5CONFORM) factory = self.BuildFactory(target=target, clobber=clobber, tests=tests, mode=mode, slave_type=slave_type, options=options, compile_timeout=compile_timeout, build_url=build_url, project=project, factory_properties=factory_properties, target_arch=target_arch) # Get the factory command object to create new steps to the factory. # Note - we give '' as build_dir as we use our own build in test tools v8_cmd_obj = v8_commands.V8Commands(factory, target, '', self._target_platform, target_arch, shard_count, shard_run, shell_flags, isolates) if factory_properties.get('archive_build'): v8_cmd_obj.AddArchiveBuild( extra_archive_paths=factory_properties.get('extra_archive_paths')) # This is for the arm tester board (we don't have other pure tester slaves). if (slave_type == 'Tester'): v8_cmd_obj.AddMoveExtracted() # Add all the tests. self._AddTests(v8_cmd_obj, tests, mode, factory_properties) return factory