Chromium Code Reviews| 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 import datetime | 5 import datetime |
| 6 import logging | |
| 7 import os | |
| 6 import re | 8 import re |
| 7 import string | 9 import string |
| 8 | 10 |
| 9 | 11 |
| 10 class Test(object): | 12 class Test(object): |
| 11 """ | 13 """ |
| 12 Base class for tests that can be retried after deapplying a previously | 14 Base class for tests that can be retried after deapplying a previously |
| 13 applied patch. | 15 applied patch. |
| 14 """ | 16 """ |
| 15 | 17 |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1740 'run find_annotated_tests.py', | 1742 'run find_annotated_tests.py', |
| 1741 api.path['checkout'].join( | 1743 api.path['checkout'].join( |
| 1742 'tools', 'android', 'find_annotated_tests.py'), | 1744 'tools', 'android', 'find_annotated_tests.py'), |
| 1743 cwd=api.path['checkout'], | 1745 cwd=api.path['checkout'], |
| 1744 args=args) | 1746 args=args) |
| 1745 api.gsutil.upload( | 1747 api.gsutil.upload( |
| 1746 temp_output_dir.join( | 1748 temp_output_dir.join( |
| 1747 '%s-android-chrome.json' % timestamp_string), | 1749 '%s-android-chrome.json' % timestamp_string), |
| 1748 'chromium-annotated-tests', 'android') | 1750 'chromium-annotated-tests', 'android') |
| 1749 | 1751 |
| 1752 class BlimpIntegrationScriptTest(Test): | |
| 1753 """ | |
| 1754 Test which runs with Blimp client and engine connecting environment. | |
| 1755 | |
| 1756 This sets up Blimp client and engine integration script initially, | |
| 1757 and cleans up the environment after test ends. | |
| 1758 """ | |
| 1759 @staticmethod | |
| 1760 def compile_targets(api): | |
| 1761 """List of compile targets needed by this test.""" | |
| 1762 return ['blimp'] | |
| 1763 | |
| 1764 def run(self, api, suffix, test_filter=None): | |
| 1765 api.chromium.set_config('chromium', TARGET_PLATFORM='linux') | |
|
jbudorick
2016/08/26 21:22:37
I don't think a Test step is the right place for t
| |
| 1766 api.chromium.run_gn(use_goma=True) | |
| 1767 api.chromium.compile(targets=['blimp']) | |
| 1768 | |
| 1769 test_path = api.path['checkout'].join('blimp', 'tools', | |
| 1770 'client_engine_integration.py') | |
| 1771 json_file_path = api.path['checkout'].join('blimp', 'tools', 'blimp_script_a rgs.json') | |
| 1772 output_path = api.path['checkout'].join('out-linux', 'Debug') | |
| 1773 blimp_apk_path = api.path['checkout'].join('out-android', 'Debug', 'Blimp.ap k') | |
|
jbudorick
2016/08/26 21:22:37
wouldn't this be out-android/Debug/apks/Blimp.apk?
| |
| 1774 | |
| 1775 try: | |
| 1776 args = ['--output-linux-directory', str(output_path), | |
| 1777 'start'] | |
| 1778 api.python( | |
| 1779 'client_engine_integration.py start', | |
| 1780 test_path, | |
| 1781 args=args) | |
| 1782 # Blimp Engine Starts | |
| 1783 args = ['--output-linux-directory', str(output_path), | |
| 1784 'load', | |
| 1785 '--apk-path', str(blimp_apk_path)] | |
| 1786 api.python( | |
|
jbudorick
2016/08/26 21:22:38
I'd like this to be a bit more general s.t. we can
| |
| 1787 'client_engine_integration.py load', | |
| 1788 test_path, | |
| 1789 args=args) | |
| 1790 finally: | |
| 1791 args = ['--output-linux-directory', str(output_path), | |
| 1792 'stop'] | |
| 1793 api.python( | |
| 1794 'client_engine_integration.py stop', | |
| 1795 test_path, | |
| 1796 args=args) | |
| 1797 | |
| 1750 GOMA_TESTS = [ | 1798 GOMA_TESTS = [ |
| 1751 GTestTest('base_unittests'), | 1799 GTestTest('base_unittests'), |
| 1752 GTestTest('content_unittests'), | 1800 GTestTest('content_unittests'), |
| 1753 ] | 1801 ] |
| OLD | NEW |