| OLD | NEW |
| 1 # | 1 # |
| 2 # Copyright 2015 Google Inc. | 2 # Copyright 2015 Google Inc. |
| 3 # | 3 # |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 #!/usr/bin/env python | 8 #!/usr/bin/env python |
| 9 | 9 |
| 10 usage = ''' | 10 usage = ''' |
| 11 Write extra flags to outfile for DM based on the bot name: | 11 Write extra flags to outfile for DM based on the bot name: |
| 12 $ python dm_flags.py outfile Test-Mac10.9-MacMini6.2-HD4000-x86_64-Release | 12 $ python dm_flags.py outfile Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug |
| 13 Or run self-tests: | 13 Or run self-tests: |
| 14 $ python dm_flags.py test | 14 $ python dm_flags.py test |
| 15 ''' | 15 ''' |
| 16 | 16 |
| 17 import inspect | 17 import inspect |
| 18 import json | 18 import json |
| 19 import os | 19 import os |
| 20 import sys | 20 import sys |
| 21 | 21 |
| 22 | 22 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 blacklist.extend('gpu skp _ gpu image _ gpu subset _'.split(' ')) | 96 blacklist.extend('gpu skp _ gpu image _ gpu subset _'.split(' ')) |
| 97 blacklist.extend('msaa skp _ msaa image _ gpu subset _'.split(' ')) | 97 blacklist.extend('msaa skp _ msaa image _ gpu subset _'.split(' ')) |
| 98 | 98 |
| 99 if 'Valgrind' in bot: | 99 if 'Valgrind' in bot: |
| 100 # PDF + .webp -> jumps depending on uninitialized memory. skia:3505 | 100 # PDF + .webp -> jumps depending on uninitialized memory. skia:3505 |
| 101 blacklist.extend('pdf _ .webp'.split(' ')) | 101 blacklist.extend('pdf _ .webp'.split(' ')) |
| 102 # These take 18+ hours to run. | 102 # These take 18+ hours to run. |
| 103 blacklist.extend('pdf gm fontmgr_iter'.split(' ')) | 103 blacklist.extend('pdf gm fontmgr_iter'.split(' ')) |
| 104 blacklist.extend('pdf _ PANO_20121023_214540.jpg'.split(' ')) | 104 blacklist.extend('pdf _ PANO_20121023_214540.jpg'.split(' ')) |
| 105 blacklist.extend('pdf skp tabl_worldjournal.skp'.split(' ')) | 105 blacklist.extend('pdf skp tabl_worldjournal.skp'.split(' ')) |
| 106 if 'Valgrind_GPU' in bot: | |
| 107 args.append('--nocpu') | |
| 108 elif 'Valgrind_CPU' in bot: | |
| 109 args.append('--nogpu') | |
| 110 | 106 |
| 111 if blacklist: | 107 if blacklist: |
| 112 args.append('--blacklist') | 108 args.append('--blacklist') |
| 113 args.extend(blacklist) | 109 args.extend(blacklist) |
| 114 | 110 |
| 115 match = [] | 111 match = [] |
| 116 if 'Alex' in bot: # skia:2793 | |
| 117 # This machine looks to be running out of heap. | |
| 118 # Running with fewer threads may help. | |
| 119 args.extend(['--threads', '1']) | |
| 120 if 'Valgrind' in bot: # skia:3021 | 112 if 'Valgrind' in bot: # skia:3021 |
| 121 match.append('~Threaded') | 113 match.append('~Threaded') |
| 122 if 'TSAN' in bot: # skia:3562 | 114 if 'TSAN' in bot: # skia:3562 |
| 123 match.append('~Math') | 115 match.append('~Math') |
| 124 | 116 |
| 125 if 'Xoom' in bot or 'GalaxyS3' in bot: # skia:1699 | 117 if 'Xoom' in bot or 'GalaxyS3' in bot: # skia:1699 |
| 126 match.append('~WritePixels') | 118 match.append('~WritePixels') |
| 127 | 119 |
| 128 # skia:3249: these images flakily don't decode on Android. | 120 # skia:3249: these images flakily don't decode on Android. |
| 129 if 'Android' in bot: | 121 if 'Android' in bot: |
| 130 match.append('~tabl_mozilla_0') | 122 match.append('~tabl_mozilla_0') |
| 131 match.append('~desk_yahoonews_0') | 123 match.append('~desk_yahoonews_0') |
| 132 | 124 |
| 133 if 'NexusPlayer' in bot: | 125 if 'NexusPlayer' in bot: |
| 134 match.append('~ResourceCache') | 126 match.append('~ResourceCache') |
| 135 | 127 |
| 136 if match: | 128 if match: |
| 137 args.append('--match') | 129 args.append('--match') |
| 138 args.extend(match) | 130 args.extend(match) |
| 139 | 131 |
| 140 # Though their GPUs are interesting, these don't test anything on | |
| 141 # the CPU that other ARMv7+NEON bots don't test faster (N5). | |
| 142 if ('Nexus10' in bot or | |
| 143 'Nexus7' in bot or | |
| 144 'GalaxyS3' in bot or | |
| 145 'GalaxyS4' in bot): | |
| 146 args.append('--nocpu') | |
| 147 return args | 132 return args |
| 148 cov_end = lineno() # Don't care about code coverage past here. | 133 cov_end = lineno() # Don't care about code coverage past here. |
| 149 | 134 |
| 150 | 135 |
| 151 def self_test(): | 136 def self_test(): |
| 152 import coverage # This way the bots don't need coverage.py to be installed. | 137 import coverage # This way the bots don't need coverage.py to be installed. |
| 153 args = {} | 138 args = {} |
| 154 cases = [ | 139 cases = [ |
| 155 'Test-Android-GalaxyS3-Mali400-Arm7-Debug', | 140 'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug', |
| 156 'Test-Android-Nexus7-Tegra3-Arm7-Release', | 141 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release', |
| 157 'Test-Android-NexusPlayer-PowerVR-x86-Release', | 142 'Test-Android-GCC-NexusPlayer-CPU-SSSE3-x86-Release', |
| 158 'Test-Android-Xoom-Tegra2-Arm7-Release', | 143 'Test-Android-GCC-Xoom-GPU-Tegra2-Arm7-Release', |
| 159 'Test-ChromeOS-Alex-GMA3150-x86-Debug', | 144 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
| 160 'Test-Ubuntu12-ShuttleA-GTX550Ti-x86_64-Release-Valgrind_GPU', | 145 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN', |
| 161 'Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN', | 146 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind', |
| 162 'Test-Ubuntu14-GCE-NoGPU-x86_64-Release-Valgrind_CPU', | 147 'Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE', |
| 163 'Test-Win7-ShuttleA-HD2000-x86-Debug-ANGLE', | |
| 164 ] | 148 ] |
| 165 | 149 |
| 166 cov = coverage.coverage() | 150 cov = coverage.coverage() |
| 167 cov.start() | 151 cov.start() |
| 168 for case in cases: | 152 for case in cases: |
| 169 args[case] = get_args(case) | 153 args[case] = get_args(case) |
| 170 cov.stop() | 154 cov.stop() |
| 171 | 155 |
| 172 this_file = os.path.basename(__file__) | 156 this_file = os.path.basename(__file__) |
| 173 _, _, not_run, _ = cov.analysis(this_file) | 157 _, _, not_run, _ = cov.analysis(this_file) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 185 if len(sys.argv) == 2 and sys.argv[1] == 'test': | 169 if len(sys.argv) == 2 and sys.argv[1] == 'test': |
| 186 self_test() | 170 self_test() |
| 187 sys.exit(0) | 171 sys.exit(0) |
| 188 | 172 |
| 189 if len(sys.argv) != 3: | 173 if len(sys.argv) != 3: |
| 190 print usage | 174 print usage |
| 191 sys.exit(1) | 175 sys.exit(1) |
| 192 | 176 |
| 193 with open(sys.argv[1], 'w') as out: | 177 with open(sys.argv[1], 'w') as out: |
| 194 json.dump(get_args(sys.argv[2]), out) | 178 json.dump(get_args(sys.argv[2]), out) |
| OLD | NEW |