Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: tools/perf/core/perf_data_generator_unittest.py

Issue 2854413002: Remove usage of bot_utils.GetDeviceAffinity in perf_data_generator (Closed)
Patch Set: Fix testGenerateTelemetryTestsBlacklistedReferenceBuildTest Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/perf/core/perf_data_generator.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 import unittest 4 import unittest
5 5
6 from core import perf_benchmark 6 from core import perf_benchmark
7 from core import perf_data_generator 7 from core import perf_data_generator
8 from core.perf_data_generator import BenchmarkMetadata 8 from core.perf_data_generator import BenchmarkMetadata
9 9
10 from telemetry import benchmark 10 from telemetry import benchmark
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 def Name(cls): 127 def Name(cls):
128 return 'not_blacklisted' 128 return 'not_blacklisted'
129 129
130 swarming_dimensions = [ 130 swarming_dimensions = [
131 {'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP', 'device_ids': ['a']} 131 {'os': 'SkyNet', 'id': 'T-850', 'pool': 'T-RIP', 'device_ids': ['a']}
132 ] 132 ]
133 test_config = { 133 test_config = {
134 'platform': 'android', 134 'platform': 'android',
135 'swarming_dimensions': swarming_dimensions, 135 'swarming_dimensions': swarming_dimensions,
136 } 136 }
137 sharding_map = {'1': {'blacklisted': 0, 'not_blacklisted': 0}}
137 benchmarks = [BlacklistedBenchmark, NotBlacklistedBenchmark] 138 benchmarks = [BlacklistedBenchmark, NotBlacklistedBenchmark]
138 tests = perf_data_generator.generate_telemetry_tests( 139 tests = perf_data_generator.generate_telemetry_tests(
139 test_config, benchmarks, None, ['blacklisted']) 140 test_config, benchmarks, sharding_map, ['blacklisted'])
140 141
141 generated_test_names = set(t['name'] for t in tests) 142 generated_test_names = set(t['name'] for t in tests)
142 self.assertEquals( 143 self.assertEquals(
143 generated_test_names, 144 generated_test_names,
144 {'blacklisted', 'not_blacklisted', 'not_blacklisted.reference'}) 145 {'blacklisted', 'not_blacklisted', 'not_blacklisted.reference'})
145 146
146 def testShouldBenchmarkBeScheduledNormal(self): 147 def testShouldBenchmarkBeScheduledNormal(self):
147 class bench(perf_benchmark.PerfBenchmark): 148 class bench(perf_benchmark.PerfBenchmark):
148 pass 149 pass
149 150
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 def testShouldBenchmarkBeScheduledOnMobileMobileTestDisabled(self): 182 def testShouldBenchmarkBeScheduledOnMobileMobileTestDisabled(self):
182 @decorators.Disabled('android') 183 @decorators.Disabled('android')
183 class bench(perf_benchmark.PerfBenchmark): 184 class bench(perf_benchmark.PerfBenchmark):
184 pass 185 pass
185 186
186 self.assertEqual( 187 self.assertEqual(
187 perf_data_generator.ShouldBenchmarkBeScheduled(bench(), 'android'), 188 perf_data_generator.ShouldBenchmarkBeScheduled(bench(), 'android'),
188 False) 189 False)
189 190
190 191
OLDNEW
« no previous file with comments | « tools/perf/core/perf_data_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698