| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 | 5 |
| 6 class Test(object): | 6 class Test(object): |
| 7 """ | 7 """ |
| 8 Base class for tests that can be retried after deapplying a previously | 8 Base class for tests that can be retried after deapplying a previously |
| 9 applied patch. | 9 applied patch. |
| 10 """ | 10 """ |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 name = 'mojo_python_tests' | 469 name = 'mojo_python_tests' |
| 470 | 470 |
| 471 def run_step(self, api, suffix, cmd_args, **kwargs): | 471 def run_step(self, api, suffix, cmd_args, **kwargs): |
| 472 return api.python(self._step_name(suffix), | 472 return api.python(self._step_name(suffix), |
| 473 api.path['checkout'].join('mojo', 'tools', | 473 api.path['checkout'].join('mojo', 'tools', |
| 474 'run_mojo_python_tests.py'), | 474 'run_mojo_python_tests.py'), |
| 475 cmd_args, | 475 cmd_args, |
| 476 **kwargs) | 476 **kwargs) |
| 477 | 477 |
| 478 | 478 |
| 479 class MojoPythonBindingsTests(PythonBasedTest): # pylint: disable=W0232 | |
| 480 name = 'mojo_python_bindings_tests' | |
| 481 | |
| 482 def run_step(self, api, suffix, cmd_args, **kwargs): | |
| 483 component = api.chromium.c.gyp_env.GYP_DEFINES.get('component', None) | |
| 484 # Python modules are not build for the component build. | |
| 485 if component == 'shared_library': | |
| 486 return None | |
| 487 args = cmd_args | |
| 488 args.extend(['--build-dir', api.chromium.c.build_dir]) | |
| 489 return api.python( | |
| 490 self._step_name(suffix), | |
| 491 api.path['checkout'].join('mojo', 'tools', | |
| 492 'run_mojo_python_bindings_tests.py'), | |
| 493 args, | |
| 494 **kwargs) | |
| 495 | |
| 496 @staticmethod | |
| 497 def compile_targets(api): | |
| 498 return ['mojo_python', 'mojo_public_test_interfaces'] | |
| 499 | |
| 500 | |
| 501 class PrintPreviewTests(PythonBasedTest): # pylint: disable=W032 | 479 class PrintPreviewTests(PythonBasedTest): # pylint: disable=W032 |
| 502 name = 'print_preview_tests' | 480 name = 'print_preview_tests' |
| 503 | 481 |
| 504 def run_step(self, api, suffix, cmd_args, **kwargs): | 482 def run_step(self, api, suffix, cmd_args, **kwargs): |
| 505 platform_arg = '.'.join(['browser_test', | 483 platform_arg = '.'.join(['browser_test', |
| 506 api.platform.normalize_platform_name(api.platform.name)]) | 484 api.platform.normalize_platform_name(api.platform.name)]) |
| 507 args = cmd_args | 485 args = list(cmd_args) |
| 508 path = api.path['checkout'].join( | 486 path = api.path['checkout'].join( |
| 509 'webkit', 'tools', 'layout_tests', 'run_webkit_tests.py') | 487 'webkit', 'tools', 'layout_tests', 'run_webkit_tests.py') |
| 510 args.extend(['--platform', platform_arg]) | 488 args.extend(['--platform', platform_arg]) |
| 511 | 489 |
| 512 # This is similar to how api.chromium.run_telemetry_test() sets the | 490 # This is similar to how api.chromium.run_telemetry_test() sets the |
| 513 # environment variable for the sandbox. | 491 # environment variable for the sandbox. |
| 514 env = {} | 492 env = {} |
| 515 if api.platform.is_linux: | 493 if api.platform.is_linux: |
| 516 env['CHROME_DEVEL_SANDBOX'] = api.path.join( | 494 env['CHROME_DEVEL_SANDBOX'] = api.path.join( |
| 517 '/opt', 'chromium', 'chrome_sandbox') | 495 '/opt', 'chromium', 'chrome_sandbox') |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 GTestTest('crypto_unittests'), | 716 GTestTest('crypto_unittests'), |
| 739 GTestTest('gfx_unittests'), | 717 GTestTest('gfx_unittests'), |
| 740 GTestTest('url_unittests'), | 718 GTestTest('url_unittests'), |
| 741 GTestTest('content_unittests'), | 719 GTestTest('content_unittests'), |
| 742 GTestTest('net_unittests'), | 720 GTestTest('net_unittests'), |
| 743 GTestTest('ui_unittests'), | 721 GTestTest('ui_unittests'), |
| 744 GTestTest('ui_ios_unittests'), | 722 GTestTest('ui_ios_unittests'), |
| 745 GTestTest('sync_unit_tests'), | 723 GTestTest('sync_unit_tests'), |
| 746 GTestTest('sql_unittests'), | 724 GTestTest('sql_unittests'), |
| 747 ] | 725 ] |
| OLD | NEW |