Commit 65cc1c1a authored by Caleb Rouleau's avatar Caleb Rouleau Committed by Commit Bot

[Benchmarking] Remove dead code from smoke tests.

Now that
https://chromium.googlesource.com/catapult/+/8df31ad1d9b887ec31d2ecca1305483501693b79
has landed, we can remove this code to augment expectations, since
now that is passed through from the project config.

Bug: 985103
Change-Id: Ib8e707bd70fb6cd5744527e20251b9d314010434
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867356Reviewed-by: default avatarRakib Hasan <rmhasan@google.com>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707459}
parent 33ae97cc
......@@ -15,8 +15,6 @@ import unittest
from chrome_telemetry_build import chromium_config
from core import path_util
from telemetry import benchmark as benchmark_module
from telemetry import decorators
from telemetry.testing import options_for_unittests
......@@ -87,17 +85,8 @@ def SmokeTestGenerator(benchmark, num_pages=1):
benchmark_cls=SinglePageBenchmark,
environment=chromium_config.GetDefaultChromiumConfig())
options.pageset_repeat = 1 # For smoke testing only run the page once.
single_page_benchmark = SinglePageBenchmark()
# TODO(crbug.com/985103): Remove this code once
# AugmentExpectationsWithFile is deleted and replaced with functionality
# in story_filter.py.
if hasattr(single_page_benchmark, 'AugmentExpectationsWithFile'):
with open(path_util.GetExpectationsPath()) as fp:
single_page_benchmark.AugmentExpectationsWithFile(fp.read())
return_code = single_page_benchmark.Run(options)
if return_code == -1:
self.skipTest('The benchmark was not run.')
self.assertEqual(0, return_code, msg='Failed: %s' % benchmark)
......
......@@ -14,7 +14,6 @@ import unittest
from chrome_telemetry_build import chromium_config
from core import path_util
from core import perf_benchmark
from telemetry import decorators
......@@ -254,17 +253,8 @@ def _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test):
if (simplified_test_name in _DISABLED_TESTS and
not options.run_disabled_tests):
self.skipTest('Test is explicitly disabled')
single_page_benchmark = SinglePageBenchmark()
# TODO(crbug.com/985103): Remove this code once
# AugmentExpectationsWithFile is deleted and replaced with functionality
# in story_filter.py.
if hasattr(single_page_benchmark, 'AugmentExpectationsWithFile'):
with open(path_util.GetExpectationsPath()) as fp:
single_page_benchmark.AugmentExpectationsWithFile(fp.read())
return_code = single_page_benchmark.Run(options)
if return_code == -1:
self.skipTest('The benchmark was not run.')
self.assertEqual(0, return_code, msg='Failed: %s' % benchmark_class)
......
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