Commit 62279db1 authored by Caleb Rouleau's avatar Caleb Rouleau Committed by Commit Bot

[Benchmarking] Skip unnecesssary browser creation in smoke test.

The possible_browser is not used. The skipping is done later when
you try to run the story (in story_runner.py), so skipping here is
unnecessary. This change saves ~2 seconds per Android test. The tests
seem to run in parallel, so it is unclear how much real time this will
save.

Bug: 944909
Change-Id: I7e89d7692a79afefcb2706fbaa4d9ce6c1af21e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887873
Auto-Submit: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711182}
parent a1adcaa2
...@@ -19,7 +19,6 @@ from core import results_processor ...@@ -19,7 +19,6 @@ from core import results_processor
from core import testing from core import testing
from telemetry import decorators from telemetry import decorators
from telemetry.internal.browser import browser_finder
from telemetry.testing import progress_reporter from telemetry.testing import progress_reporter
from py_utils import discover from py_utils import discover
...@@ -228,14 +227,9 @@ def _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test): ...@@ -228,14 +227,9 @@ def _GenerateSmokeTestCase(benchmark_class, story_to_smoke_test):
options = GenerateBenchmarkOptions( options = GenerateBenchmarkOptions(
output_dir=temp_dir, output_dir=temp_dir,
benchmark_cls=SinglePageBenchmark) benchmark_cls=SinglePageBenchmark)
possible_browser = browser_finder.FindBrowser(options)
if possible_browser is None:
self.skipTest('Cannot find the browser to run the test.')
simplified_test_name = self.id().replace( simplified_test_name = self.id().replace(
'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.', 'benchmarks.system_health_smoke_test.SystemHealthBenchmarkSmokeTest.',
'') '')
# Sanity check to ensure that that substring removal was effective. # Sanity check to ensure that that substring removal was effective.
assert len(simplified_test_name) < len(self.id()) assert len(simplified_test_name) < len(self.id())
......
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