
Piggy-backed a performance comparison mode onto the existing bisect architecture. The script will build and run the specified performance test, revert any local changes, build, and run again. At the moment, only chromium changes can be perf-tested. Future CL's will add the ability to perf test blink changes. Waiting on http://codereview.chromium.org/27413002, http://codereview.chromium.org/26179009. BUG= TEST= Modify run-perf-test.cfg, commit, and run git try --user=<user> -b linux_perf_bisect Expect bot to run with/without patch, ie. http://build.chromium.org/p/tryserver.chromium/builders/linux_perf_bisect/builds/387 Review URL: https://codereview.chromium.org/27165006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229963 0039d316-1c4b-4281-b951-d872f2087c98
51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
# Copyright (c) 2013 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.
|
|
|
|
"""Top-level presubmit script for bisect/perf trybot.
|
|
|
|
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
|
|
details on the presubmit API built into gcl.
|
|
"""
|
|
|
|
import imp
|
|
import os
|
|
|
|
def _ExamineConfigFiles(input_api):
|
|
for f in input_api.AffectedFiles():
|
|
if (not f.LocalPath().endswith('run-bisect-perf-regression.cfg') and
|
|
not f.LocalPath().endswith('run-perf-test.cfg')):
|
|
continue
|
|
|
|
try:
|
|
cfg_file = imp.load_source('config', os.path.basename(f.LocalPath()))
|
|
|
|
for k, v in cfg_file.config.iteritems():
|
|
if v:
|
|
return f.LocalPath()
|
|
except (IOError, AttributeError, TypeError):
|
|
return f.LocalPath()
|
|
|
|
return None
|
|
|
|
def _CheckNoChangesToBisectConfigFile(input_api, output_api):
|
|
results = _ExamineConfigFiles(input_api)
|
|
if results:
|
|
return [output_api.PresubmitError(
|
|
'The bisection config file should only contain a config dict with '
|
|
'empty fields. Changes to this file should never be submitted.',
|
|
items=[results])]
|
|
|
|
return []
|
|
|
|
def CommonChecks(input_api, output_api):
|
|
results = []
|
|
results.extend(_CheckNoChangesToBisectConfigFile(input_api, output_api))
|
|
return results
|
|
|
|
def CheckChangeOnUpload(input_api, output_api):
|
|
return CommonChecks(input_api, output_api)
|
|
|
|
def CheckChangeOnCommit(input_api, output_api):
|
|
return CommonChecks(input_api, output_api)
|