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

Side by Side Diff: scripts/slave/recipe_modules/gpu/api.py

Issue 137993010: Added support for properly building and running isolates in recipes. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Added missed files. Created 6 years, 11 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
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/isolate/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 from slave import recipe_api 5 from slave import recipe_api
6 6
7 SIMPLE_TESTS_TO_RUN = [ 7 SIMPLE_TESTS_TO_RUN = [
8 'content_gl_tests', 8 'content_gl_tests',
9 'gles2_conform_test', 9 'gles2_conform_test',
10 'gl_tests',
11 'angle_unittests' 10 'angle_unittests'
12 ] 11 ]
13 12
14 class GpuApi(recipe_api.RecipeApi): 13 class GpuApi(recipe_api.RecipeApi):
15 def setup(self): 14 def setup(self):
16 """Call this once before any of the other APIs in this module.""" 15 """Call this once before any of the other APIs in this module."""
17 16
18 # These values may be replaced by external configuration later 17 # These values may be replaced by external configuration later
19 self._dashboard_upload_url = 'https://chromeperf.appspot.com' 18 self._dashboard_upload_url = 'https://chromeperf.appspot.com'
20 self._gs_bucket_name = 'chromium-gpu-archive' 19 self._gs_bucket_name = 'chromium-gpu-archive'
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 self.m.chromium.c.gyp_env.GYP_DEFINES['disable_glibcxx_debug'] = 1 52 self.m.chromium.c.gyp_env.GYP_DEFINES['disable_glibcxx_debug'] = 1
54 53
55 # Don't skip the frame_rate data, as it's needed for the frame rate tests. 54 # Don't skip the frame_rate data, as it's needed for the frame rate tests.
56 # Per iannucci@, it can be relied upon that solutions[1] is src-internal. 55 # Per iannucci@, it can be relied upon that solutions[1] is src-internal.
57 # Consider managing this in a 'gpu' config. 56 # Consider managing this in a 'gpu' config.
58 del self.m.gclient.c.solutions[1].custom_deps[ 57 del self.m.gclient.c.solutions[1].custom_deps[
59 'src/chrome/test/data/perf/frame_rate/private'] 58 'src/chrome/test/data/perf/frame_rate/private']
60 59
61 self.m.chromium.c.gyp_env.GYP_DEFINES['internal_gles2_conform_tests'] = 1 60 self.m.chromium.c.gyp_env.GYP_DEFINES['internal_gles2_conform_tests'] = 1
62 61
62 # Isolates don't work with the component build yet.
63 # Fortunately, we can easily tell which GPU bots are using the
64 # component build -- all of those building or testing Debug.
65 self._use_isolates = self.m.chromium.is_release_build
66 if self._use_isolates:
67 self.m.isolate.set_isolate_environment(self.m.chromium.c)
68
63 def checkout_steps(self): 69 def checkout_steps(self):
64 # Always force a gclient-revert in order to avoid problems when 70 # Always force a gclient-revert in order to avoid problems when
65 # directories are added to, removed from, and re-added to the repo. 71 # directories are added to, removed from, and re-added to the repo.
66 # crbug.com/329577 72 # crbug.com/329577
67 yield self.m.gclient.checkout(revert=True) 73 yield self.m.gclient.checkout(revert=True)
68 gclient_data = self.m.step_history['gclient sync'].json.output 74 gclient_data = self.m.step_history['gclient sync'].json.output
69 self._build_revision = gclient_data['solutions']['src/']['revision'] 75 self._build_revision = gclient_data['solutions']['src/']['revision']
70 # If being run as a try server, apply the CL. 76 # If being run as a try server, apply the CL.
71 if 'rietveld' in self.m.properties: 77 if 'rietveld' in self.m.properties:
72 yield self.m.rietveld.apply_issue(self.m.rietveld.calculate_issue_root()) 78 yield self.m.rietveld.apply_issue(self.m.rietveld.calculate_issue_root())
73 79
74 def compile_steps(self): 80 def compile_steps(self):
75 # We only need to runhooks if we're going to compile locally. 81 # We only need to runhooks if we're going to compile locally.
76 yield self.m.chromium.runhooks() 82 yield self.m.chromium.runhooks()
77 # Since performance tests aren't run on the debug builders, it isn't 83 # Since performance tests aren't run on the debug builders, it isn't
78 # necessary to build all of the targets there. 84 # necessary to build all of the targets there.
79 build_tag = '' if self.m.chromium.is_release_build else 'debug_' 85 build_tag = '' if self.m.chromium.is_release_build else 'debug_'
86 # It's harmless to process the isolate-related targets even if they
87 # aren't supported on the current configuration (because the component
88 # build is used).
80 yield self.m.chromium.compile( 89 yield self.m.chromium.compile(
81 targets=['chromium_gpu_%sbuilder' % build_tag, 'gl_tests_run']) 90 targets=['chromium_gpu_%sbuilder' % build_tag, 'gl_tests_run'])
82 # This is only an initial test of the isolate upload path; the 91 # This is only an initial test of the isolate upload path; the
83 # subsequent GPU isolates will follow. 92 # subsequent GPU isolates will follow.
84 yield self.m.isolate.manifest_to_hash(['gl_tests']) 93 yield self.m.isolate.manifest_to_hash(['gl_tests'])
85 94
86 def upload_steps(self): 95 def upload_steps(self):
87 yield self.m.archive.zip_and_upload_build( 96 yield self.m.archive.zip_and_upload_build(
88 'package_build', 97 'package_build',
89 self.m.chromium.c.build_config_fs, 98 self.m.chromium.c.build_config_fs,
(...skipping 25 matching lines...) Expand all
115 'start_crash_service', 124 'start_crash_service',
116 self.m.path.build('scripts', 'slave', 'chromium', 125 self.m.path.build('scripts', 'slave', 'chromium',
117 'run_crash_handler.py'), 126 'run_crash_handler.py'),
118 ['--build-dir', 127 ['--build-dir',
119 self.m.chromium.c.build_dir, 128 self.m.chromium.c.build_dir,
120 '--target', 129 '--target',
121 self.m.chromium.c.build_config_fs]) 130 self.m.chromium.c.build_config_fs])
122 131
123 # Note: --no-xvfb is the default. 132 # Note: --no-xvfb is the default.
124 for test in SIMPLE_TESTS_TO_RUN: 133 for test in SIMPLE_TESTS_TO_RUN:
125 yield self.m.chromium.runtests(test, spawn_dbus=True) 134 yield self.m.chromium.runtests(test)
135
136 if self._use_isolates:
137 yield self.m.isolate.run_isolate_test('gl_tests')
138 else:
139 yield self.m.chromium.runtests('gl_tests')
126 140
127 # Choose a reasonable default for the location of the sandbox binary 141 # Choose a reasonable default for the location of the sandbox binary
128 # on the bots. 142 # on the bots.
129 env = {} 143 env = {}
130 if self.m.platform.is_linux: 144 if self.m.platform.is_linux:
131 env['CHROME_DEVEL_SANDBOX'] = '/opt/chromium/chrome_sandbox' 145 env['CHROME_DEVEL_SANDBOX'] = '/opt/chromium/chrome_sandbox'
132 146
133 # Google Maps Pixel tests. 147 # Google Maps Pixel tests.
134 yield self.run_telemetry_gpu_test('maps', name='maps_pixel_test', 148 yield self.run_telemetry_gpu_test('maps', name='maps_pixel_test',
135 args=[ 149 args=[
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 """Returns a step which runs a Telemetry based GPU test (via 234 """Returns a step which runs a Telemetry based GPU test (via
221 run_gpu_test).""" 235 run_gpu_test)."""
222 236
223 test_args = ['-v'] 237 test_args = ['-v']
224 if args: 238 if args:
225 test_args.extend(args) 239 test_args.extend(args)
226 240
227 return self.m.chromium.run_telemetry_test( 241 return self.m.chromium.run_telemetry_test(
228 str(self.m.path.checkout('content', 'test', 'gpu', 'run_gpu_test')), 242 str(self.m.path.checkout('content', 'test', 'gpu', 'run_gpu_test')),
229 test, name, test_args, results_directory, spawn_dbus=True) 243 test, name, test_args, results_directory, spawn_dbus=True)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/isolate/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698