Chromium Code Reviews| Index: scripts/slave/recipe_modules/chromium_tests/steps.py |
| diff --git a/scripts/slave/recipe_modules/chromium_tests/steps.py b/scripts/slave/recipe_modules/chromium_tests/steps.py |
| index ad0b3ee6ea8945f84f16b5117590492a507de7d4..fd4e771ef8ce2b9bc8df500a77f093f521d58808 100644 |
| --- a/scripts/slave/recipe_modules/chromium_tests/steps.py |
| +++ b/scripts/slave/recipe_modules/chromium_tests/steps.py |
| @@ -2,6 +2,7 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import datetime |
| import re |
| import string |
| @@ -1862,6 +1863,42 @@ class IncrementalCoverageTest(Test): |
| api.chromium_android.get_changed_lines_for_revision() |
| api.chromium_android.incremental_coverage_report() |
| +class FindAnnotatedTest(Test): |
|
jbudorick
2016/06/28 10:37:19
Hm, I should've been more clear. This isn't what I
mikecase (-- gone --)
2016/06/28 22:41:31
After talking with Yoland it seems like making it
|
| + test_apks = { |
|
mikecase (-- gone --)
2016/06/28 22:41:31
eh, _TEST_APKS probably. or _DEFAULT_TEST_APKS
the real yoland
2016/07/08 19:02:20
Done
|
| + 'android_webview_test_apk': 'AndroidWebViewTest', |
| + 'blimp_test_apk': 'BlimpTest', |
| + 'chrome_public_test_apk': 'ChromePublicTest', |
| + 'chrome_sync_shell_test_apk': 'ChromeSyncShellTest', |
| + 'content_shell_test_apk': 'ContentShellTest', |
| + 'system_webview_shell_layout_test_apk': 'SystemWebViewShellLayoutTest', |
| + } |
| + |
| + @staticmethod |
| + def compile_targets(api): |
| + return FindAnnotatedTest.test_apks.keys() |
| + |
| + def run(self, api, suffix, test_filter=None): |
| + try: |
| + temp_output_dir = api.path.mkdtemp('annotated_tests_json_temp') |
| + timestamp = datetime.datetime.utcnow() |
| + timestamp_string = timestamp.strftime('%Y%m%dT%H%M%S') |
| + |
| + api.python( |
| + 'run find_annotated_tests.py', |
| + api.path['checkout'].join( |
| + 'tools', 'android', 'find_annotated_tests.py'), |
| + args = [ |
| + '--test-apks', ' '.join(FindAnnotatedTest.test_apks.values()), |
|
mikecase (-- gone --)
2016/06/28 22:41:31
How does your script find the test apks? Should yo
|
| + '--apk-output-dir', api.chromium.output_dir, |
| + '--json-output-dir', temp_output_dir, |
| + '--timestamp-string', timestamp_string, |
| + '-v']) |
| + api.gsutil.upload( |
| + temp_output_dir.join( |
| + '%s-android-chrome.json' % timestamp_string), |
| + 'chromium-annotated-tests', 'android') |
| + finally: |
| + api.file.rmtree('Delete temp out directory', temp_output_dir) |
|
Paweł Hajdan Jr.
2016/07/04 10:42:42
Could you use tempfile.temp_dir context manager fr
the real yoland
2016/07/13 20:36:12
Done
|
| GOMA_TESTS = [ |
| GTestTest('base_unittests'), |