blob: bcfa552f0ca51528cd2040c4827047d45dc19bc8 [file] [log] [blame]
Brian Sheedya487bbc2021-07-12 23:12:531# Copyright 2021 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4"""GPU-specific implementation of the unexpected passes' builders module."""
5
6from __future__ import print_function
7
8from unexpected_passes_common import builders
9
10
11class GpuBuilders(builders.Builders):
12 def __init__(self):
13 super(GpuBuilders, self).__init__()
14 self._fake_ci_builders = None
15
16 def _BuilderRunsTestOfInterest(self, test_map, suite):
17 tests = test_map.get('isolated_scripts', [])
18 for t in tests:
19 if t.get('isolate_name') not in self.GetIsolateNames():
20 continue
21 if suite in t.get('args', []):
22 return True
23 return False
24
25 def GetIsolateNames(self):
26 return {
27 'fuchsia_telemetry_gpu_integration_test',
28 'telemetry_gpu_integration_test',
29 }
30
31 def GetFakeCiBuilders(self):
32 if self._fake_ci_builders is None:
33 # Go from try -> CI then reverse the mapping so that there's less of a
34 # chance of typos being introduced in the repeated trybot names.
35 fake_try_builders = {
36 # chromium.gpu.fyi
37 'android_angle_rel_ng': [
38 'ANGLE GPU Android Release (Nexus 5X)',
39 ],
40 'android_optional_gpu_tests_rel': [
41 'Optional Android Release (Nexus 5X)',
42 'Optional Android Release (Pixel 4)',
43 ],
44 'linux-angle-rel': [
45 'ANGLE GPU Linux Release (Intel HD 630)',
46 'ANGLE GPU Linux Release (NVIDIA)',
47 ],
48 'linux_optional_gpu_tests_rel': [
49 'Optional Linux Release (Intel HD 630)',
50 'Optional Linux Release (NVIDIA)',
51 ],
52 'mac_optional_gpu_tests_rel': [
53 'Optional Mac Release (Intel)',
54 'Optional Mac Retina Release (AMD)',
55 'Optional Mac Retina Release (NVIDIA)',
56 ],
57 'win_optional_gpu_tests_rel': [
58 'Optional Win10 x64 Release (Intel HD 630)',
59 'Optional Win10 x64 Release (NVIDIA)',
60 ],
61 }
62
63 self._fake_ci_builders = {}
64 for try_builder, ci_builder_list in fake_try_builders.items():
65 for ci in ci_builder_list:
66 self._fake_ci_builders[ci] = try_builder
67
68 return self._fake_ci_builders
69
70 def GetNonChromiumBuilders(self):
71 return {
72 'Win V8 FYI Release (NVIDIA)',
73 'Mac V8 FYI Release (Intel)',
74 'Linux V8 FYI Release - pointer compression (NVIDIA)',
75 'Linux V8 FYI Release (NVIDIA)',
76 'Android V8 FYI Release (Nexus 5X)',
77 }