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

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: Add into steps.py Created 4 years, 6 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):
1867 test_apks = {
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 failures(self, api, suffix):
1881 return []
1882
1883 def run(self, api, suffix, test_filter=None):
1884 try:
1885 temp_output_dir = api.path.mkdtemp('annotated_tests_json_temp')
1886 timestamp = datetime.datetime.utcnow()
1887 timestamp_string = timestamp.strftime('%Y%m%dT%H%M%S')
1888
1889 api.python(
1890 'run find_annotated_tests.py',
1891 api.path['checkout'].join(
1892 'tools', 'android', 'find_annotated_tests.py'),
1893 args = [
1894 '--test-apks', ' '.join(FindAnnotatedTest.test_apks.values()),
1895 '--apk-output-dir', api.chromium.output_dir,
1896 '--json-output-dir', temp_output_dir,
1897 '--timestamp-string', timestamp_string,
1898 '-v'])
1899 api.gsutil.upload(
1900 temp_output_dir.join(
1901 '%s-android-chrome.json' % timestamp_string),
1902 'chromium-annotated-tests', 'android')
1903 finally:
1904 api.file.rmtree('Delete temp out directory', temp_output_dir)
1865 1905
1866 GOMA_TESTS = [ 1906 GOMA_TESTS = [
1867 GTestTest('base_unittests'), 1907 GTestTest('base_unittests'),
1868 GTestTest('content_unittests'), 1908 GTestTest('content_unittests'),
1869 ] 1909 ]
OLDNEW
« no previous file with comments | « masters/master.chromium.infra.cron/slaves.cfg ('k') | scripts/slave/recipes/android/find_annotated_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698