| 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 """For all the benchmarks that set options, test that the options are valid.""" | 5 """For all the benchmarks that set options, test that the options are valid.""" |
| 6 | 6 |
| 7 from collections import defaultdict |
| 7 import logging | 8 import logging |
| 8 import os | 9 import os |
| 9 import unittest | 10 import unittest |
| 10 from collections import defaultdict | |
| 11 | 11 |
| 12 from telemetry import benchmark as benchmark_module | 12 from telemetry import benchmark as benchmark_module |
| 13 from telemetry.core import browser_options | 13 from telemetry.core import browser_options |
| 14 from telemetry.core import discover | 14 from telemetry.core import discover |
| 15 from telemetry.unittest_util import progress_reporter | 15 from telemetry.unittest_util import progress_reporter |
| 16 | 16 |
| 17 | 17 |
| 18 def _GetPerfDir(*subdirs): | 18 def _GetPerfDir(*subdirs): |
| 19 perf_dir = os.path.dirname(os.path.dirname(__file__)) | 19 perf_dir = os.path.dirname(os.path.dirname(__file__)) |
| 20 return os.path.join(perf_dir, *subdirs) | 20 return os.path.join(perf_dir, *subdirs) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 setattr(BenchmarkOptionsTest, benchmark.Name(), | 60 setattr(BenchmarkOptionsTest, benchmark.Name(), |
| 61 _BenchmarkOptionsTestGenerator(benchmark)) | 61 _BenchmarkOptionsTestGenerator(benchmark)) |
| 62 suite.addTest(BenchmarkOptionsTest(benchmark.Name())) | 62 suite.addTest(BenchmarkOptionsTest(benchmark.Name())) |
| 63 suite.addTest(TestNoBenchmarkNamesDuplication()) | 63 suite.addTest(TestNoBenchmarkNamesDuplication()) |
| 64 | 64 |
| 65 | 65 |
| 66 def load_tests(_, _2, _3): | 66 def load_tests(_, _2, _3): |
| 67 suite = progress_reporter.TestSuite() | 67 suite = progress_reporter.TestSuite() |
| 68 _AddBenchmarkOptionsTests(suite) | 68 _AddBenchmarkOptionsTests(suite) |
| 69 return suite | 69 return suite |
| OLD | NEW |