(self, sys_args=None)
| 159 | return self.default_framework_name |
| 160 | |
| 161 | def execute(self, sys_args=None): |
| 162 | if sys_args is None: # pragma: no cover |
| 163 | sys_args = sys.argv[1:] |
| 164 | parser = self._create_parser() |
| 165 | self.options, args = self._parse_args(parser, sys_args) |
| 166 | self.infra_staging = self.options.infra_staging |
| 167 | if self.options.swarming: |
| 168 | logging.getLogger().setLevel(logging.INFO) |
| 169 | |
| 170 | # Swarming doesn't print how isolated commands are called. Lets make |
| 171 | # this less cryptic by printing it ourselves. |
| 172 | print(' '.join(sys.argv)) |
| 173 | |
| 174 | # TODO(machenbach): Print used Python version until we have switched to |
| 175 | # Python3 everywhere. |
| 176 | print('Running with:') |
| 177 | print(sys.version) |
| 178 | |
| 179 | # Kill stray processes from previous tasks on swarming. |
| 180 | util.kill_processes_linux() |
| 181 | |
| 182 | try: |
| 183 | self._load_build_config() |
| 184 | try: |
| 185 | self._process_default_options() |
| 186 | self._process_options() |
| 187 | except TestRunnerError: |
| 188 | parser.print_help() |
| 189 | raise |
| 190 | |
| 191 | args = self._parse_test_args(args) |
| 192 | |
| 193 | with os_context(self.target_os, self.options) as ctx: |
| 194 | self._setup_env() |
| 195 | names = self._args_to_suite_names(args) |
| 196 | tests = self._load_testsuite_generators(ctx, names) |
| 197 | print(">>> Running tests for %s.%s" % (self.build_config.arch, |
| 198 | self.mode_options.label)) |
| 199 | return self._do_execute(tests, args, ctx) |
| 200 | except TestRunnerError: |
| 201 | traceback.print_exc() |
| 202 | return utils.EXIT_CODE_INTERNAL_ERROR |
| 203 | except KeyboardInterrupt: |
| 204 | return utils.EXIT_CODE_INTERRUPTED |
| 205 | except Exception: |
| 206 | traceback.print_exc() |
| 207 | return utils.EXIT_CODE_INTERNAL_ERROR |
| 208 | |
| 209 | |
| 210 | def _create_parser(self): |
nothing calls this directly
no test coverage detected