Commit c258c3a3 authored by jbroman's avatar jbroman Committed by Commit bot

Telemetry: Fix exact_matches in telemetry.test_runner.

Previously, if exact_matches was True but there were no exact matches,
it would return fuzzy matches instead. This is not what the caller asked
for.

GPU test names are changed to match the buildbot config, since they were
previously relying on fuzzy matching.

SHERIFFS: May cause errors like:

  No test named "some_test_name".

  Available tests are:
    ...

If so, this CL can be safely reverted.

BUG=413334,413442

Committed: https://crrev.com/566ed9f6e71cea313c88e8f259eca76581b72d67
Cr-Commit-Position: refs/heads/master@{#294757}

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

Cr-Commit-Position: refs/heads/master@{#295888}
parent ac2c408b
......@@ -36,13 +36,12 @@ class _GpuProcessValidator(page_test.PageTest):
class GpuProcess(benchmark.Benchmark):
"""Tests that accelerated content triggers the creation of a GPU process"""
test = _GpuProcessValidator
page_set = page_sets.GpuProcessTestsPageSet
def CreateExpectations(self, page_set):
return expectations.GpuProcessExpectations()
def CreatePageSet(self, options):
page_set = super(GpuProcess, self).CreatePageSet(options)
page_set = page_sets.GpuProcessTestsPageSet()
for page in page_set.pages:
page.script_to_evaluate_on_commit = test_harness_script
return page_set
......@@ -65,10 +65,9 @@ class _GpuRasterizationValidator(cloud_storage_test_base.ValidatorBase):
class GpuRasterization(cloud_storage_test_base.TestBase):
"""Tests that GPU rasterization produces valid content"""
test = _GpuRasterizationValidator
page_set = page_sets.GpuRasterizationTestsPageSet
def CreatePageSet(self, options):
page_set = super(GpuRasterization, self).CreatePageSet(options)
page_set = page_sets.GpuRasterizationTestsPageSet()
for page in page_set.pages:
page.script_to_evaluate_on_commit = test_harness_script
return page_set
# Copyright (c) 2012 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.
import memory_expectations
import memory_test_expectations
import page_sets
from telemetry import benchmark
......@@ -99,16 +99,15 @@ class _MemoryValidator(page_test.PageTest):
return 'Memory allocation too %s (was %d MB, should be %d MB +/- %d MB)' % (
low_or_high, mb_used, SINGLE_TAB_LIMIT_MB, WIGGLE_ROOM_MB)
class Memory(benchmark.Benchmark):
class MemoryTest(benchmark.Benchmark):
"""Tests GPU memory limits"""
test = _MemoryValidator
page_set = page_sets.MemoryTestsPageSet
def CreateExpectations(self, page_set):
return memory_expectations.MemoryExpectations()
return memory_test_expectations.MemoryTestExpectations()
def CreatePageSet(self, options):
page_set = super(Memory, self).CreatePageSet(options)
page_set = page_sets.MemoryTestsPageSet()
for page in page_set.pages:
page.script_to_evaluate_on_commit = test_harness_script
return page_set
......@@ -18,7 +18,7 @@ from telemetry.page import test_expectations
# Examples: ('nvidia', 0x1234), ('arm', 'Mali-T604')
# Device IDs must be paired with a GPU vendor.
class MemoryExpectations(test_expectations.TestExpectations):
class MemoryTestExpectations(test_expectations.TestExpectations):
def SetExpectations(self):
# Sample Usage:
# self.Fail('Memory.CSS3D',
......
......@@ -148,7 +148,6 @@ class _PixelValidator(cloud_storage_test_base.ValidatorBase):
class Pixel(cloud_storage_test_base.TestBase):
test = _PixelValidator
page_set = page_sets.PixelTestsPageSet
@classmethod
def AddTestCommandLineArgs(cls, group):
......@@ -159,7 +158,7 @@ class Pixel(cloud_storage_test_base.TestBase):
default=default_reference_image_dir)
def CreatePageSet(self, options):
page_set = super(Pixel, self).CreatePageSet(options)
page_set = page_sets.PixelTestsPageSet()
for page in page_set.pages:
page.script_to_evaluate_on_commit = test_harness_script
return page_set
......
......@@ -246,6 +246,7 @@ def _MatchTestName(input_test_name, exact_matches=True):
for test_class in _Tests():
if exact_match == test_class.Name():
return [test_class]
return []
# Fuzzy matching.
return [test_class for test_class in _Tests()
......
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