| Index: content/test/gpu/PRESUBMIT.py
|
| diff --git a/content/test/gpu/PRESUBMIT.py b/content/test/gpu/PRESUBMIT.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..11d0a7bf8107c9b33948b5c102cc3ac974080655
|
| --- /dev/null
|
| +++ b/content/test/gpu/PRESUBMIT.py
|
| @@ -0,0 +1,36 @@
|
| +# Copyright 2015 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +
|
| +def _CommonChecks(input_api, output_api):
|
| + results = []
|
| +
|
| + pylint_checks = input_api.canned_checks.GetPylint(
|
| + input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api),
|
| + pylintrc='pylintrc')
|
| +
|
| + results.extend(input_api.RunTests(pylint_checks))
|
| + return results
|
| +
|
| +
|
| +def _GetPathsToPrepend(input_api):
|
| + telemetry_dir = input_api.PresubmitLocalPath()
|
| + chromium_src_dir = input_api.os_path.join(
|
| + input_api.PresubmitLocalPath(), '..', '..', '..', 'tools', 'telemetry')
|
| + return [
|
| + input_api.os_path.join(telemetry_dir, 'telemetry'),
|
| + input_api.os_path.join(telemetry_dir, 'third_party', 'mock'),
|
| + ]
|
| +
|
| +
|
| +def CheckChangeOnUpload(input_api, output_api):
|
| + results = []
|
| + results.extend(_CommonChecks(input_api, output_api))
|
| + return results
|
| +
|
| +
|
| +def CheckChangeOnCommit(input_api, output_api):
|
| + results = []
|
| + results.extend(_CommonChecks(input_api, output_api))
|
| + return results
|
|
|