[Android WebViewShell] Add inclusion test for webview exposed stable interfaces.
[chromium-blink-merge.git] / tools / telemetry / PRESUBMIT.py
blob5961c94e99bd885ba1bb67996028846b7b002da4
1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 def _CommonChecks(input_api, output_api):
7 results = []
9 # TODO(nduca): This should call update_docs.IsUpdateDocsNeeded().
10 # Disabled due to crbug.com/255326.
11 if False:
12 update_docs_path = input_api.os_path.join(
13 input_api.PresubmitLocalPath(), 'update_docs')
14 assert input_api.os_path.exists(update_docs_path)
15 results.append(output_api.PresubmitError(
16 'Docs are stale. Please run:\n' +
17 '$ %s' % input_api.os_path.abspath(update_docs_path)))
19 pylint_checks = input_api.canned_checks.GetPylint(
20 input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api),
21 pylintrc='pylintrc')
23 results.extend(input_api.RunTests(pylint_checks))
24 return results
27 def _GetPathsToPrepend(input_api):
28 telemetry_dir = input_api.PresubmitLocalPath()
29 chromium_src_dir = input_api.os_path.join(telemetry_dir, '..', '..')
30 return [
31 telemetry_dir,
32 input_api.os_path.join(telemetry_dir, 'third_party', 'mock'),
33 input_api.os_path.join(telemetry_dir, 'third_party', 'typ'),
34 input_api.os_path.join(telemetry_dir, 'third_party', 'websocket-client'),
36 input_api.os_path.join(chromium_src_dir, 'build', 'android'),
37 input_api.os_path.join(
38 chromium_src_dir, 'third_party', 'py_trace_event', 'src'),
39 input_api.os_path.join(chromium_src_dir, 'third_party', 'trace-viewer'),
40 input_api.os_path.join(chromium_src_dir, 'third_party', 'webpagereplay'),
44 def CheckChangeOnUpload(input_api, output_api):
45 results = []
46 results.extend(_CommonChecks(input_api, output_api))
47 return results
50 def CheckChangeOnCommit(input_api, output_api):
51 results = []
52 results.extend(_CommonChecks(input_api, output_api))
53 return results