summaryrefslogtreecommitdiffstats
path: root/tools/perf/PRESUBMIT.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/PRESUBMIT.py')
-rw-r--r--tools/perf/PRESUBMIT.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/PRESUBMIT.py b/tools/perf/PRESUBMIT.py
index e2a028e..9bb8eb1 100644
--- a/tools/perf/PRESUBMIT.py
+++ b/tools/perf/PRESUBMIT.py
@@ -4,14 +4,16 @@
import os
import sys
+
PYLINT_BLACKLIST = []
PYLINT_DISABLED_WARNINGS = ['R0923', 'R0201', 'E1101']
+
def _CommonChecks(input_api, output_api):
results = []
old_sys_path = sys.path
try:
- sys.path = [os.path.join('..', 'telemetry')] + sys.path
+ sys.path = [os.path.join(os.pardir, 'telemetry')] + sys.path
results.extend(input_api.canned_checks.RunPylint(
input_api, output_api,
black_list=PYLINT_BLACKLIST,
@@ -20,11 +22,13 @@ def _CommonChecks(input_api, output_api):
sys.path = old_sys_path
return results
+
def CheckChangeOnUpload(input_api, output_api):
report = []
report.extend(_CommonChecks(input_api, output_api))
return report
+
def CheckChangeOnCommit(input_api, output_api):
report = []
report.extend(_CommonChecks(input_api, output_api))