Commit 79c22027 authored by kouhei@chromium.org's avatar kouhei@chromium.org

telemetry: deprecate GetModernizedTestName which is not used anymore

PageTestRunner.GetModernizedTestName was used to support old testnames to be specified, but it is not used anymore. The conversion map in tools/perf/run_measurement
 was already empty.

NOTRY=true
BUG=None

Review URL: https://codereview.chromium.org/183893036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255344 0039d316-1c4b-4281-b951-d872f2087c98
parent d57fa06e
...@@ -25,23 +25,7 @@ def main(): ...@@ -25,23 +25,7 @@ def main():
print bootstrap.ListAllDepsPaths(CROS_BOOSTRAP_DEPS_PATH) print bootstrap.ListAllDepsPaths(CROS_BOOSTRAP_DEPS_PATH)
return 0 return 0
old_benchmark_names = { runner = page_measurement_runner.PageMeasurementRunner()
}
# There are bots that are hard-coded to run some specific named tests.
# Convert these to the current naming conventions by overriding them
# in the runner.
class MeasurementRunner(page_measurement_runner.PageMeasurementRunner):
def GetModernizedTestName(self, arg):
if arg not in old_benchmark_names:
return arg
sys.stderr.write(
'An old name %s was given. Please use %s in the future.\n' % (
arg,
old_benchmark_names.get(arg)))
return old_benchmark_names[arg]
runner = MeasurementRunner()
env = environment.Environment([BASE_DIR]) env = environment.Environment([BASE_DIR])
return runner.Run(env) return runner.Run(env)
......
...@@ -62,20 +62,12 @@ class PageTestRunner(object): ...@@ -62,20 +62,12 @@ class PageTestRunner(object):
test_name or None test_name or None
""" """
test_name = None test_name = None
for arg in [self.GetModernizedTestName(a) for a in args]: for arg in args:
if arg in test_constructors: if arg in test_constructors:
test_name = arg test_name = arg
return test_name return test_name
def GetModernizedTestName(self, arg):
"""Sometimes tests change names but buildbots keep calling the old name.
If arg matches an old test name, return the new test name instead.
Otherwise, return the arg.
"""
return arg
def GetPageSet(self, test, env): def GetPageSet(self, test, env):
ps = test.CreatePageSet(self._args, self._options) ps = test.CreatePageSet(self._args, self._options)
if ps: if ps:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment