| 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 |
| 21 from benchmarks import image_decoding | 23 from benchmarks import image_decoding |
| 22 from benchmarks import indexeddb_perf | 24 from benchmarks import indexeddb_perf |
| 23 from benchmarks import jetstream | 25 from benchmarks import jetstream |
| 24 from benchmarks import kraken | 26 from benchmarks import kraken |
| 25 from benchmarks import memory | 27 from benchmarks import memory |
| 26 from benchmarks import new_tab | 28 from benchmarks import new_tab |
| 27 from benchmarks import octane | 29 from benchmarks import octane |
| 28 from benchmarks import rasterize_and_record_micro | 30 from benchmarks import rasterize_and_record_micro |
| 29 from benchmarks import repaint | 31 from benchmarks import repaint |
| 32 from benchmarks import service_worker |
| 30 from benchmarks import spaceport | 33 from benchmarks import spaceport |
| 31 from benchmarks import speedometer | 34 from benchmarks import speedometer |
| 32 from benchmarks import sunspider | 35 from benchmarks import sunspider |
| 33 from benchmarks import text_selection | 36 from benchmarks import text_selection |
| 37 from benchmarks import v8 |
| 38 from benchmarks import webrtc |
| 34 | 39 |
| 35 | 40 |
| 36 def SmokeTestGenerator(benchmark): | 41 def SmokeTestGenerator(benchmark): |
| 37 # NOTE TO SHERIFFS: DO NOT DISABLE THIS TEST. | 42 # NOTE TO SHERIFFS: DO NOT DISABLE THIS TEST. |
| 38 # | 43 # |
| 39 # This smoke test dynamically tests all benchmarks. So disabling it for one | 44 # This smoke test dynamically tests all benchmarks. So disabling it for one |
| 40 # failing or flaky benchmark would disable a much wider swath of coverage | 45 # failing or flaky benchmark would disable a much wider swath of coverage |
| 41 # than is usally intended. Instead, if a particular benchmark is failing, | 46 # than is usally intended. Instead, if a particular benchmark is failing, |
| 42 # disable it in tools/perf/benchmarks/*. | 47 # disable it in tools/perf/benchmarks/*. |
| 43 @benchmark_module.Disabled('chromeos') # crbug.com/351114 | 48 @benchmark_module.Disabled('chromeos') # crbug.com/351114 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 jetstream, # Take 206 seconds. | 93 jetstream, # Take 206 seconds. |
| 89 text_selection, # Always fails on cq bot. | 94 text_selection, # Always fails on cq bot. |
| 90 memory # Flaky on bots, crbug.com/513767 | 95 memory # Flaky on bots, crbug.com/513767 |
| 91 } | 96 } |
| 92 | 97 |
| 93 # Some smoke benchmark tests that run quickly on desktop platform can be very | 98 # Some smoke benchmark tests that run quickly on desktop platform can be very |
| 94 # slow on Android. So we create a separate set of black list only for Android. | 99 # slow on Android. So we create a separate set of black list only for Android. |
| 95 _ANDROID_BLACK_LIST_MODULES = { | 100 _ANDROID_BLACK_LIST_MODULES = { |
| 96 kraken, # Takes 275 seconds on Android. | 101 kraken, # Takes 275 seconds on Android. |
| 97 sunspider, # Takes 163 seconds on Android. | 102 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 |
| 98 } | 108 } |
| 99 | 109 |
| 100 | 110 |
| 101 def load_tests(loader, standard_tests, pattern): | 111 def load_tests(loader, standard_tests, pattern): |
| 102 del loader, standard_tests, pattern # unused | 112 del loader, standard_tests, pattern # unused |
| 103 suite = progress_reporter.TestSuite() | 113 suite = progress_reporter.TestSuite() |
| 104 | 114 |
| 105 benchmarks_dir = os.path.dirname(__file__) | 115 benchmarks_dir = os.path.dirname(__file__) |
| 106 top_level_dir = os.path.dirname(benchmarks_dir) | 116 top_level_dir = os.path.dirname(benchmarks_dir) |
| 107 | 117 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 158 |
| 149 # TODO(bashi): Remove once crrev.com/1266833004 is landed. | 159 # TODO(bashi): Remove once crrev.com/1266833004 is landed. |
| 150 if benchmark.Name() == 'memory.blink_memory_mobile': | 160 if benchmark.Name() == 'memory.blink_memory_mobile': |
| 151 method._disabled_strings.add('android') | 161 method._disabled_strings.add('android') |
| 152 | 162 |
| 153 setattr(BenchmarkSmokeTest, benchmark.Name(), method) | 163 setattr(BenchmarkSmokeTest, benchmark.Name(), method) |
| 154 | 164 |
| 155 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) | 165 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) |
| 156 | 166 |
| 157 return suite | 167 return suite |
| OLD | NEW |