Lines Matching refs:self
163 def __init__(self, build_config):
166 self.arch = 'ia32'
168 self.arch = build_config['v8_target_cpu']
170 self.asan = build_config['is_asan']
171 self.cfi_vptr = build_config['is_cfi']
172 self.control_flow_integrity = build_config['v8_control_flow_integrity']
173 self.concurrent_marking = build_config['v8_enable_concurrent_marking']
174 self.single_generation = build_config['v8_enable_single_generation']
175 self.dcheck_always_on = build_config['dcheck_always_on']
176 self.gcov_coverage = build_config['is_gcov_coverage']
177 self.is_android = build_config['is_android']
178 self.is_clang = build_config['is_clang']
179 self.is_debug = build_config['is_debug']
180 self.is_full_debug = build_config['is_full_debug']
181 self.msan = build_config['is_msan']
182 self.no_i18n = not build_config['v8_enable_i18n_support']
183 self.predictable = build_config['v8_enable_verify_predictable']
184 self.simulator_run = (build_config['target_cpu'] !=
186 self.tsan = build_config['is_tsan']
188 self.ubsan_vptr = build_config['is_ubsan_vptr']
189 self.verify_csa = build_config['v8_enable_verify_csa']
190 self.lite_mode = build_config['v8_enable_lite_mode']
191 self.pointer_compression = build_config['v8_enable_pointer_compression']
192 self.pointer_compression_shared_cage = build_config['v8_enable_pointer_compression_shared_cage']
193 self.shared_ro_heap = build_config['v8_enable_shared_ro_heap']
194 self.sandbox = build_config['v8_enable_sandbox']
195 self.third_party_heap = build_config['v8_enable_third_party_heap']
196 self.webassembly = build_config['v8_enable_webassembly']
197 self.dict_property_const_tracking = build_config['v8_dict_property_const_tracking']
199 if self.arch in ['mips', 'mipsel', 'mips64', 'mips64el']:
200 self.mips_arch_variant = build_config['mips_arch_variant']
201 self.mips_use_msa = build_config['mips_use_msa']
204 def use_sanitizer(self):
205 return (self.asan or self.cfi_vptr or self.msan or self.tsan or
206 self.ubsan_vptr)
208 def __str__(self):
211 if self.asan:
213 if self.cfi_vptr:
215 if self.control_flow_integrity:
217 if self.dcheck_always_on:
219 if self.gcov_coverage:
221 if self.msan:
223 if self.no_i18n:
225 if self.predictable:
227 if self.tsan:
229 if self.ubsan_vptr:
231 if self.verify_csa:
233 if self.lite_mode:
235 if self.pointer_compression:
237 if self.pointer_compression_shared_cage:
239 if self.sandbox:
241 if self.third_party_heap:
243 if self.webassembly:
245 if self.dict_property_const_tracking:
270 def __init__(self, basedir=None):
271 self.basedir = basedir or BASE_DIR
272 self.outdir = None
273 self.build_config = None
274 self.mode_options = None
275 self.target_os = None
276 self.infra_staging = False
279 def framework_name(self):
283 def execute(self, sys_args=None):
287 parser = self._create_parser()
288 options, args = self._parse_args(parser, sys_args)
289 self.infra_staging = options.infra_staging
303 self._load_build_config(options)
304 command.setup(self.target_os, options.device)
307 self._process_default_options(options)
308 self._process_options(options)
313 args = self._parse_test_args(args)
314 tests = self._load_testsuite_generators(args, options)
315 self._setup_env()
316 print(">>> Running tests for %s.%s" % (self.build_config.arch,
317 self.mode_options.label))
318 exit_code = self._do_execute(tests, args, options)
335 def _create_parser(self):
339 self._add_parser_default_options(parser)
340 self._add_parser_options(parser)
343 def _add_parser_default_options(self, parser):
354 default=os.path.join(self.basedir, 'test'))
440 def _add_parser_options(self, parser):
443 def _parse_args(self, parser, sys_args):
452 def _load_build_config(self, options):
453 for outdir in self._possible_outdirs(options):
455 self.build_config = _do_load_build_config(outdir, options.verbose)
459 self.outdir = outdir
464 if not self.build_config: # pragma: no cover
468 print('Build found: %s' % self.outdir)
469 if str(self.build_config):
471 print(self.build_config)
475 if self.build_config.is_android:
476 self.target_os = 'android'
478 self.target_os = utils.GuessOS()
484 def _possible_outdirs(self, options):
487 yield self._get_gn_outdir()
496 yield os.path.join(self.basedir, outdir)
498 def _get_gn_outdir(self):
499 gn_out_dir = os.path.join(self.basedir, DEFAULT_OUT_GN)
513 def _process_default_options(self, options):
514 if self.build_config.is_debug:
515 self.mode_options = DEBUG_MODE
516 elif self.build_config.dcheck_always_on:
517 self.mode_options = TRY_RELEASE_MODE
519 self.mode_options = RELEASE_MODE
521 if options.arch and options.arch != self.build_config.arch:
523 options.arch, self.build_config.arch))
528 'build directory (%s) instead.' % self.outdir)
531 if self.build_config.is_android:
540 def _process_options(self, options):
543 def _setup_env(self):
545 os.chdir(self.basedir)
550 symbolizer_option = self._get_external_symbolizer_option()
552 if self.build_config.asan:
568 if self.build_config.cfi_vptr:
576 if self.build_config.ubsan_vptr:
582 if self.build_config.msan:
585 if self.build_config.tsan:
587 self.basedir,
600 def _get_external_symbolizer_option(self):
602 self.basedir,
616 def _parse_test_args(self, args):
618 args = self._get_default_suite_names()
627 def _args_to_suite_names(self, args, test_root):
633 def _get_default_suite_names(self):
636 def _load_testsuite_generators(self, args, options):
637 names = self._args_to_suite_names(args, options.test_root)
638 test_config = self._create_test_config(options)
639 variables = self._get_statusfile_variables(options)
648 self.framework_name)
650 if self._is_testsuite_supported(suite, options):
656 def _is_testsuite_supported(self, suite, options):
661 def _get_statusfile_variables(self, options):
663 self.build_config.arch in ['mipsel', 'mips', 'mips64', 'mips64el'] and
664 self.build_config.mips_arch_variant == "r6" and
665 self.build_config.mips_use_msa)
668 self.build_config.arch in ['mipsel', 'mips', 'mips64', 'mips64el'] and
669 self.build_config.mips_arch_variant)
680 if self.build_config.arch == 'mips64el' or \
681 self.build_config.arch == 'mipsel':
684 if self.build_config.arch == 'loong64':
688 if self.build_config.arch == 's390x' and \
689 not self.build_config.simulator_run and \
694 if self.build_config.arch == 'ppc64' and \
695 not self.build_config.simulator_run and \
700 "arch": self.build_config.arch,
701 "asan": self.build_config.asan,
703 "cfi_vptr": self.build_config.cfi_vptr,
704 "control_flow_integrity": self.build_config.control_flow_integrity,
705 "concurrent_marking": self.build_config.concurrent_marking,
706 "single_generation": self.build_config.single_generation,
707 "dcheck_always_on": self.build_config.dcheck_always_on,
712 "gcov_coverage": self.build_config.gcov_coverage,
713 "has_webassembly": self.build_config.webassembly,
715 "is_clang": self.build_config.is_clang,
716 "is_full_debug": self.build_config.is_full_debug,
718 "mode": self.mode_options.status_mode,
719 "msan": self.build_config.msan,
721 "no_i18n": self.build_config.no_i18n,
725 "predictable": self.build_config.predictable,
727 "simulator_run": self.build_config.simulator_run and
729 "system": self.target_os,
730 "third_party_heap": self.build_config.third_party_heap,
731 "tsan": self.build_config.tsan,
732 "ubsan_vptr": self.build_config.ubsan_vptr,
733 "verify_csa": self.build_config.verify_csa,
734 "lite_mode": self.build_config.lite_mode,
735 "pointer_compression": self.build_config.pointer_compression,
736 "pointer_compression_shared_cage": self.build_config.pointer_compression_shared_cage,
737 "no_js_shared_memory": (not self.build_config.shared_ro_heap) or
738 (self.build_config.pointer_compression and
739 not self.build_config.pointer_compression_shared_cage),
740 "sandbox": self.build_config.sandbox,
741 "dict_property_const_tracking": self.build_config.dict_property_const_tracking,
744 def _runner_flags(self):
748 def _create_test_config(self, options):
749 timeout = options.timeout * self._timeout_scalefactor(options)
754 mode_flags=self.mode_options.flags + self._runner_flags(),
756 noi18n=self.build_config.no_i18n,
759 shell_dir=self.outdir,
765 def _timeout_scalefactor(self, options):
767 factor = self.mode_options.timeout_scalefactor
768 if self.build_config.arch in SLOW_ARCHS:
770 if self.build_config.lite_mode:
772 if self.build_config.predictable:
774 if self.build_config.tsan:
776 if self.build_config.use_sanitizer:
778 if self.build_config.is_full_debug:
784 def _do_execute(self, suites, args, options):
787 def _prepare_procs(self, procs):
793 def _create_shard_proc(self, options):
794 myid, count = self._get_shard_info(options)
799 def _get_shard_info(self, options):
836 def _create_progress_indicators(self, test_count, options):
842 procs.append(progress.JsonTestProgressIndicator(self.framework_name))
855 def _create_result_tracker(self, options):
858 def _create_timeout_proc(self, options):
863 def _create_signal_proc(self):
866 def _create_rerun_proc(self, options):