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 every benchmark that has a composable measurement. | 5 """Run the first page of every benchmark that has a composable measurement. |
6 | 6 |
7 Ideally this test would be comprehensive, but the above serves as a | 7 Ideally this test would be comprehensive, but the above serves as a |
8 kind of smoke test. | 8 kind of smoke test. |
9 """ | 9 """ |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 all_benchmarks = discover.DiscoverClasses( | 67 all_benchmarks = discover.DiscoverClasses( |
68 benchmarks_dir, top_level_dir, test.Test, pattern='*.py').values() | 68 benchmarks_dir, top_level_dir, test.Test, pattern='*.py').values() |
69 | 69 |
70 for benchmark in all_benchmarks: | 70 for benchmark in all_benchmarks: |
71 if benchmark.PageTestClass() not in all_measurements: | 71 if benchmark.PageTestClass() not in all_measurements: |
72 # If the benchmark is not in measurements, then it is not composable. | 72 # If the benchmark is not in measurements, then it is not composable. |
73 # Ideally we'd like to test these as well, but the non-composable | 73 # Ideally we'd like to test these as well, but the non-composable |
74 # benchmarks are usually long-running benchmarks. | 74 # benchmarks are usually long-running benchmarks. |
75 continue | 75 continue |
76 | 76 |
| 77 # TODO(tonyg): Smoke doesn't work with session_restore yet. |
| 78 if benchmark.Name().startswith('session_restore'): |
| 79 continue |
| 80 |
77 if hasattr(benchmark, 'generated_profile_archive'): | 81 if hasattr(benchmark, 'generated_profile_archive'): |
78 # We'd like to test these, but don't know how yet. | 82 # We'd like to test these, but don't know how yet. |
79 continue | 83 continue |
80 | 84 |
81 class BenchmarkSmokeTest(unittest.TestCase): | 85 class BenchmarkSmokeTest(unittest.TestCase): |
82 pass | 86 pass |
83 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) | 87 setattr(BenchmarkSmokeTest, benchmark.Name(), SmokeTestGenerator(benchmark)) |
84 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) | 88 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) |
85 | 89 |
86 return suite | 90 return suite |
OLD | NEW |