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

Side by Side Diff: content/test/gpu/PRESUBMIT.py

Issue 1413883003: Add a presubmit script and pylintrc for content/test/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
(Empty)
1 # Copyright 2012 The Chromium Authors. All rights reserved.
Ken Russell (switch to Gerrit) 2015/10/21 22:12:08 2012 -> 2015
Corentin Wallez 2015/10/21 23:07:24 Done.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 def _PyLintChecks(input_api, output_api):
6 pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api,
7 extra_paths_list=_GetPathsToPrepend(input_api), pylintrc='pylintrc')
8 return input_api.RunTests(pylint_checks)
9
10 def _GetPathsToPrepend(input_api):
11 current_dir = input_api.PresubmitLocalPath()
12 chromium_src_dir = input_api.os_path.join(current_dir, '..', '..', '..')
13 return [
14 input_api.os_path.join(current_dir, 'gpu_tests'),
15 input_api.os_path.join(chromium_src_dir, 'tools', 'perf'),
16 input_api.os_path.join(chromium_src_dir, 'tools', 'telemetry'),
17 ]
18
19 def _WebGLTextExpectationsTests(input_api, output_api):
20 if not input_api.AffectedFiles():
21 return []
22
23 cmd = [
24 input_api.os_path.join(input_api.PresubmitLocalPath(), 'run_unittests.py'),
Ken Russell (switch to Gerrit) 2015/10/21 22:12:08 I think we should run all of the GPU unittests in
Corentin Wallez 2015/10/21 23:07:24 Done
25 'gpu_tests.webgl_conformance_expectations_unittest.' + \
26 'WebGLConformanceExpectationsTest',
27 ]
28 if input_api.platform == 'win32':
29 cmd = [input_api.python_executable] + cmd
30
31 if input_api.is_committing:
32 message_type = output_api.PresubmitError
33 else:
34 message_type = output_api.PresubmitPromptWarning
35
36 cmd_name = 'run_webgl_conformance_expectations_unittests',
Ken Russell (switch to Gerrit) 2015/10/21 22:12:08 run_gpu_unittests instead?
Corentin Wallez 2015/10/21 23:07:24 Done.
37 test_cmd = input_api.Command(
38 name=cmd_name,
39 cmd=cmd,
40 kwargs={},
41 message=message_type,
42 )
43
44 if input_api.verbose:
45 print 'Running', cmd_name
46 return input_api.RunTests([test_cmd])
47
48 def CheckChangeOnUpload(input_api, output_api):
49 results = []
50 results.extend(_PyLintChecks(input_api, output_api))
51 results.extend(_WebGLTextExpectationsTests(input_api, output_api))
52 return results
53
54 def CheckChangeOnCommit(input_api, output_api):
55 results = []
56 results.extend(_PyLintChecks(input_api, output_api))
57 results.extend(_WebGLTextExpectationsTests(input_api, output_api))
58 return results
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_project_config.py » ('j') | content/test/gpu/gpu_tests/cloud_storage_test_base.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698