| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Run the first page of one benchmark for every module. | 5 """Run the first page of one benchmark for every module. |
| 6 | 6 |
| 7 Only benchmarks that have a composable measurement are included. | 7 Only benchmarks that have a composable measurement are included. |
| 8 Ideally this test would be comprehensive, however, running one page | 8 Ideally this test would be comprehensive, however, running one page |
| 9 of every benchmark would run impractically long. | 9 of every benchmark would run impractically long. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 import os | 12 import os |
| 13 import sys | 13 import sys |
| 14 import unittest | 14 import unittest |
| 15 | 15 |
| 16 from telemetry import benchmark as benchmark_module | 16 from telemetry import benchmark as benchmark_module |
| 17 from telemetry.core import discover | 17 from telemetry.core import discover |
| 18 from telemetry.testing import options_for_unittests | 18 from telemetry.testing import options_for_unittests |
| 19 from telemetry.testing import progress_reporter | 19 from telemetry.testing import progress_reporter |
| 20 | 20 |
| 21 from benchmarks import blink_style | |
| 22 from benchmarks import dromaeo | |
| 23 from benchmarks import image_decoding | 21 from benchmarks import image_decoding |
| 24 from benchmarks import indexeddb_perf | 22 from benchmarks import indexeddb_perf |
| 25 from benchmarks import jetstream | 23 from benchmarks import jetstream |
| 26 from benchmarks import kraken | 24 from benchmarks import kraken |
| 27 from benchmarks import memory | 25 from benchmarks import memory |
| 28 from benchmarks import new_tab | 26 from benchmarks import new_tab |
| 29 from benchmarks import octane | 27 from benchmarks import octane |
| 30 from benchmarks import rasterize_and_record_micro | 28 from benchmarks import rasterize_and_record_micro |
| 31 from benchmarks import repaint | 29 from benchmarks import repaint |
| 32 from benchmarks import service_worker | |
| 33 from benchmarks import spaceport | 30 from benchmarks import spaceport |
| 34 from benchmarks import speedometer | 31 from benchmarks import speedometer |
| 35 from benchmarks import sunspider | 32 from benchmarks import sunspider |
| 36 from benchmarks import text_selection | 33 from benchmarks import text_selection |
| 37 from benchmarks import v8 | |
| 38 from benchmarks import webrtc | |
| 39 | 34 |
| 40 | 35 |
| 41 def SmokeTestGenerator(benchmark): | 36 def SmokeTestGenerator(benchmark): |
| 42 # NOTE TO SHERIFFS: DO NOT DISABLE THIS TEST. | 37 # NOTE TO SHERIFFS: DO NOT DISABLE THIS TEST. |
| 43 # | 38 # |
| 44 # This smoke test dynamically tests all benchmarks. So disabling it for one | 39 # This smoke test dynamically tests all benchmarks. So disabling it for one |
| 45 # failing or flaky benchmark would disable a much wider swath of coverage | 40 # failing or flaky benchmark would disable a much wider swath of coverage |
| 46 # than is usally intended. Instead, if a particular benchmark is failing, | 41 # than is usally intended. Instead, if a particular benchmark is failing, |
| 47 # disable it in tools/perf/benchmarks/*. | 42 # disable it in tools/perf/benchmarks/*. |
| 48 @benchmark_module.Disabled('chromeos') # crbug.com/351114 | 43 @benchmark_module.Disabled('chromeos') # crbug.com/351114 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 jetstream, # Take 206 seconds. | 88 jetstream, # Take 206 seconds. |
| 94 text_selection, # Always fails on cq bot. | 89 text_selection, # Always fails on cq bot. |
| 95 memory # Flaky on bots, crbug.com/513767 | 90 memory # Flaky on bots, crbug.com/513767 |
| 96 } | 91 } |
| 97 | 92 |
| 98 # Some smoke benchmark tests that run quickly on desktop platform can be very | 93 # Some smoke benchmark tests that run quickly on desktop platform can be very |
| 99 # slow on Android. So we create a separate set of black list only for Android. | 94 # slow on Android. So we create a separate set of black list only for Android. |
| 100 _ANDROID_BLACK_LIST_MODULES = { | 95 _ANDROID_BLACK_LIST_MODULES = { |
| 101 kraken, # Takes 275 seconds on Android. | 96 kraken, # Takes 275 seconds on Android. |
| 102 sunspider, # Takes 163 seconds on Android. | 97 sunspider, # Takes 163 seconds on Android. |
| 103 service_worker, # crbug.com/574135 | |
| 104 v8, # crbug.com/574135 | |
| 105 blink_style, # crbug.com/574135 | |
| 106 dromaeo, # crbug.com/574135 | |
| 107 webrtc # crbug.com/574135 | |
| 108 } | 98 } |
| 109 | 99 |
| 110 | 100 |
| 111 def load_tests(loader, standard_tests, pattern): | 101 def load_tests(loader, standard_tests, pattern): |
| 112 del loader, standard_tests, pattern # unused | 102 del loader, standard_tests, pattern # unused |
| 113 suite = progress_reporter.TestSuite() | 103 suite = progress_reporter.TestSuite() |
| 114 | 104 |
| 115 benchmarks_dir = os.path.dirname(__file__) | 105 benchmarks_dir = os.path.dirname(__file__) |
| 116 top_level_dir = os.path.dirname(benchmarks_dir) | 106 top_level_dir = os.path.dirname(benchmarks_dir) |
| 117 | 107 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 148 |
| 159 # TODO(bashi): Remove once crrev.com/1266833004 is landed. | 149 # TODO(bashi): Remove once crrev.com/1266833004 is landed. |
| 160 if benchmark.Name() == 'memory.blink_memory_mobile': | 150 if benchmark.Name() == 'memory.blink_memory_mobile': |
| 161 method._disabled_strings.add('android') | 151 method._disabled_strings.add('android') |
| 162 | 152 |
| 163 setattr(BenchmarkSmokeTest, benchmark.Name(), method) | 153 setattr(BenchmarkSmokeTest, benchmark.Name(), method) |
| 164 | 154 |
| 165 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) | 155 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) |
| 166 | 156 |
| 167 return suite | 157 return suite |
| OLD | NEW |