Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/steps.py

Issue 2063323002: Create recipe to run find_annotated_tests.py periodically (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Move from recipe to a step Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 re 6 import re
6 import string 7 import string
7 8
8 9
9 class Test(object): 10 class Test(object):
10 """ 11 """
11 Base class for tests that can be retried after deapplying a previously 12 Base class for tests that can be retried after deapplying a previously
12 applied patch. 13 applied patch.
13 """ 14 """
14 15
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 @staticmethod 1856 @staticmethod
1856 def compile_targets(api): 1857 def compile_targets(api):
1857 """List of compile targets needed by this test.""" 1858 """List of compile targets needed by this test."""
1858 return [] 1859 return []
1859 1860
1860 def run(self, api, suffix, test_filter=None): 1861 def run(self, api, suffix, test_filter=None):
1861 api.chromium_android.coverage_report(upload=False) 1862 api.chromium_android.coverage_report(upload=False)
1862 api.chromium_android.get_changed_lines_for_revision() 1863 api.chromium_android.get_changed_lines_for_revision()
1863 api.chromium_android.incremental_coverage_report() 1864 api.chromium_android.incremental_coverage_report()
1864 1865
1866 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
1867 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
1868 'android_webview_test_apk': 'AndroidWebViewTest',
1869 'blimp_test_apk': 'BlimpTest',
1870 'chrome_public_test_apk': 'ChromePublicTest',
1871 'chrome_sync_shell_test_apk': 'ChromeSyncShellTest',
1872 'content_shell_test_apk': 'ContentShellTest',
1873 'system_webview_shell_layout_test_apk': 'SystemWebViewShellLayoutTest',
1874 }
1875
1876 @staticmethod
1877 def compile_targets(api):
1878 return FindAnnotatedTest.test_apks.keys()
1879
1880 def run(self, api, suffix, test_filter=None):
1881 try:
1882 temp_output_dir = api.path.mkdtemp('annotated_tests_json_temp')
1883 timestamp = datetime.datetime.utcnow()
1884 timestamp_string = timestamp.strftime('%Y%m%dT%H%M%S')
1885
1886 api.python(
1887 'run find_annotated_tests.py',
1888 api.path['checkout'].join(
1889 'tools', 'android', 'find_annotated_tests.py'),
1890 args = [
1891 '--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
1892 '--apk-output-dir', api.chromium.output_dir,
1893 '--json-output-dir', temp_output_dir,
1894 '--timestamp-string', timestamp_string,
1895 '-v'])
1896 api.gsutil.upload(
1897 temp_output_dir.join(
1898 '%s-android-chrome.json' % timestamp_string),
1899 'chromium-annotated-tests', 'android')
1900 finally:
1901 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
1865 1902
1866 GOMA_TESTS = [ 1903 GOMA_TESTS = [
1867 GTestTest('base_unittests'), 1904 GTestTest('base_unittests'),
1868 GTestTest('content_unittests'), 1905 GTestTest('content_unittests'),
1869 ] 1906 ]
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium_tests/chromium_fyi.py ('k') | scripts/slave/recipes/chromium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698