OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from recipe_engine.types import freeze | 5 from recipe_engine.types import freeze |
6 from recipe_engine import recipe_api | 6 from recipe_engine import recipe_api |
7 from . import builders | 7 from . import builders |
8 from . import steps | 8 from . import steps |
9 | 9 |
10 | 10 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 self.m.chromium.run_gn(use_goma=True) | 174 self.m.chromium.run_gn(use_goma=True) |
175 | 175 |
176 self.m.chromium.compile() | 176 self.m.chromium.compile() |
177 | 177 |
178 def runtests(self): | 178 def runtests(self): |
179 """Add a suite of test steps. | 179 """Add a suite of test steps. |
180 | 180 |
181 Args: | 181 Args: |
182 test_suite: The name of the test suite. | 182 test_suite: The name of the test suite. |
183 """ | 183 """ |
184 with self.m.step.context({'cwd': self.m.path['checkout']}): | 184 context = {} |
| 185 if self._working_dir: |
| 186 context['cwd'] = self._working_dir |
| 187 |
| 188 with self.m.step.context(context): |
185 if self.c.use_isolate: | 189 if self.c.use_isolate: |
186 self.m.isolate.remove_build_metadata() | 190 self.m.isolate.remove_build_metadata() |
187 self.m.isolate.isolate_tests(self.m.chromium.output_dir, | 191 self.m.isolate.isolate_tests(self.m.chromium.output_dir, |
188 targets=self.NORMAL_TESTS) | 192 targets=self.NORMAL_TESTS) |
189 | 193 |
190 tests = steps.generate_tests(self, self.c.TEST_SUITE, self.revision, | 194 tests = steps.generate_tests(self, self.c.TEST_SUITE, self.revision, |
191 self.c.enable_swarming) | 195 self.c.enable_swarming) |
192 with self.m.step.defer_results(): | 196 with self.m.step.defer_results(): |
193 if tests: | 197 if tests: |
194 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 198 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 def clean_test_output(self): | 315 def clean_test_output(self): |
312 """Remove all test output in out/, since we have tests leaking files.""" | 316 """Remove all test output in out/, since we have tests leaking files.""" |
313 out_dir = self.m.path['checkout'].join('out') | 317 out_dir = self.m.path['checkout'].join('out') |
314 self.m.python('clean test output files', | 318 self.m.python('clean test output files', |
315 script=self.resource('cleanup_files.py'), | 319 script=self.resource('cleanup_files.py'), |
316 args=[out_dir], | 320 args=[out_dir], |
317 infra_step=True) | 321 infra_step=True) |
318 | 322 |
319 def virtual_webcam_check(self): | 323 def virtual_webcam_check(self): |
320 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) | 324 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) |
OLD | NEW |