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 """ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, | 77 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, |
78 index_by_class_name=False).values() | 78 index_by_class_name=False).values() |
79 for benchmark in all_benchmarks: | 79 for benchmark in all_benchmarks: |
80 if benchmark.PageTestClass() not in all_measurements: | 80 if benchmark.PageTestClass() not in all_measurements: |
81 # If the benchmark is not in measurements, then it is not composable. | 81 # If the benchmark is not in measurements, then it is not composable. |
82 # Ideally we'd like to test these as well, but the non-composable | 82 # Ideally we'd like to test these as well, but the non-composable |
83 # benchmarks are usually long-running benchmarks. | 83 # benchmarks are usually long-running benchmarks. |
84 continue | 84 continue |
85 | 85 |
86 # TODO(tonyg): Smoke doesn't work with session_restore yet. | 86 # TODO(tonyg): Smoke doesn't work with session_restore yet. |
87 if benchmark.Name().startswith('session_restore'): | 87 if (benchmark.Name().startswith('session_restore') or |
| 88 benchmark.Name().startswith('skpicture_printer')): |
88 continue | 89 continue |
89 | 90 |
90 if hasattr(benchmark, 'generated_profile_archive'): | 91 if hasattr(benchmark, 'generated_profile_archive'): |
91 # We'd like to test these, but don't know how yet. | 92 # We'd like to test these, but don't know how yet. |
92 continue | 93 continue |
93 | 94 |
94 class BenchmarkSmokeTest(unittest.TestCase): | 95 class BenchmarkSmokeTest(unittest.TestCase): |
95 pass | 96 pass |
96 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) | 97 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) |
97 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) | 98 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) |
98 | 99 |
99 return suite | 100 return suite |
OLD | NEW |