msarett | 114912d | 2015-03-25 12:28:33 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2015 Google Inc. |
| 3 | # |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | # |
| 7 | |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 8 | #!/usr/bin/env python |
| 9 | |
| 10 | usage = ''' |
| 11 | Write extra flags to outfile for DM based on the bot name: |
borenet | 1e37d17 | 2015-03-27 05:42:18 -0700 | [diff] [blame] | 12 | $ python dm_flags.py outfile Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 13 | Or run self-tests: |
| 14 | $ python dm_flags.py test |
| 15 | ''' |
| 16 | |
| 17 | import inspect |
| 18 | import json |
| 19 | import os |
| 20 | import sys |
| 21 | |
| 22 | |
| 23 | def lineno(): |
| 24 | caller = inspect.stack()[1] # Up one level to our caller. |
| 25 | return inspect.getframeinfo(caller[0]).lineno |
| 26 | |
| 27 | |
| 28 | cov_start = lineno()+1 # We care about coverage starting just past this def. |
mtklein | f73e589 | 2015-02-24 11:45:11 -0800 | [diff] [blame] | 29 | def get_args(bot): |
mtklein | d9381ac | 2016-02-24 08:58:27 -0800 | [diff] [blame] | 30 | args = [] |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 31 | |
mtklein | d33fe1f | 2016-03-22 11:08:24 -0700 | [diff] [blame] | 32 | # 32-bit desktop bots tend to run out of memory, because they have relatively |
| 33 | # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit. |
| 34 | if '-x86-' in bot and not 'NexusPlayer' in bot: |
mtklein | bee39c5 | 2016-03-22 12:36:01 -0700 | [diff] [blame] | 35 | args.extend('--threads 4'.split(' ')) |
mtklein | d33fe1f | 2016-03-22 11:08:24 -0700 | [diff] [blame] | 36 | |
bsalomon | 3ddf967 | 2016-04-06 09:22:36 -0700 | [diff] [blame] | 37 | # These are the canonical configs that we would ideally run on all bots. We |
| 38 | # may opt out or substitute some below for specific bots |
| 39 | configs = ['565', '8888', 'gpu', 'gpusrgb', 'pdf'] |
| 40 | # Add in either msaa4 or msaa16 to the canonical set of configs to run |
| 41 | if 'Android' in bot or 'iOS' in bot: |
| 42 | configs.append('msaa4') |
| 43 | else: |
| 44 | configs.append('msaa16') |
| 45 | |
| 46 | # With msaa, the S4 crashes and the NP produces a long error stream when we |
| 47 | # run with MSAA. The Tegra2 and Tegra3 just don't support it. No record of |
| 48 | # why we're not running msaa on iOS, probably started with gpu config and just |
| 49 | # haven't tried. |
| 50 | if ('GalaxyS4' in bot or |
| 51 | 'NexusPlayer' in bot or |
| 52 | 'Tegra3' in bot or |
| 53 | 'iOS' in bot): |
| 54 | configs = [x for x in configs if 'msaa' not in x] |
| 55 | |
| 56 | # Runs out of memory on Android bots and Daisy. Everyone else seems fine. |
| 57 | if 'Android' in bot or 'Daisy' in bot: |
| 58 | configs.remove('pdf') |
borenet | e3aeaec | 2015-05-05 13:11:27 -0700 | [diff] [blame] | 59 | |
mtklein | dd54e5d | 2016-02-29 09:51:09 -0800 | [diff] [blame] | 60 | if '-GCE-' in bot: |
mtklein | ed854fb | 2016-03-02 17:15:15 -0800 | [diff] [blame] | 61 | configs.extend(['f16', 'srgb']) # Gamma-correct formats. |
| 62 | configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture. |
mtklein | dd54e5d | 2016-02-29 09:51:09 -0800 | [diff] [blame] | 63 | |
bsalomon | f93982a | 2015-10-30 09:05:32 -0700 | [diff] [blame] | 64 | if '-TSAN' not in bot: |
| 65 | if ('TegraK1' in bot or |
| 66 | 'GTX550Ti' in bot or |
| 67 | 'GTX660' in bot or |
| 68 | 'GT610' in bot): |
| 69 | if 'Android' in bot: |
cdalton | c28afdb | 2016-03-29 20:05:07 -0700 | [diff] [blame] | 70 | configs.append('nvprdit4') |
bsalomon | f93982a | 2015-10-30 09:05:32 -0700 | [diff] [blame] | 71 | else: |
cdalton | c28afdb | 2016-03-29 20:05:07 -0700 | [diff] [blame] | 72 | configs.append('nvprdit16') |
mtklein | fca5c88 | 2015-04-21 10:34:47 -0700 | [diff] [blame] | 73 | |
bsalomon | b8797bb | 2016-04-05 08:49:38 -0700 | [diff] [blame] | 74 | # We want to test the OpenGL config not the GLES config on the X1 |
| 75 | if 'TegraX1' in bot: |
bsalomon | 3ddf967 | 2016-04-06 09:22:36 -0700 | [diff] [blame] | 76 | configs = [x.replace('gpu', 'gl') for x in configs] |
| 77 | configs = [x.replace('msaa', 'glmsaa') for x in configs] |
mtklein | 083b869 | 2016-04-06 12:27:07 -0700 | [diff] [blame] | 78 | |
borenet | 97025e3 | 2015-04-28 09:54:55 -0700 | [diff] [blame] | 79 | # NP is running out of RAM when we run all these modes. skia:3255 |
| 80 | if 'NexusPlayer' not in bot: |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 81 | configs.extend(mode + '-8888' for mode in |
mtklein | 4a34ecb | 2016-01-08 10:19:35 -0800 | [diff] [blame] | 82 | ['serialize', 'tiles_rt', 'pic']) |
bsalomon | 0bb8c1f | 2015-06-04 15:10:45 -0700 | [diff] [blame] | 83 | |
mtklein | ee2a3ea | 2015-02-25 08:16:19 -0800 | [diff] [blame] | 84 | if 'ANGLE' in bot: |
| 85 | configs.append('angle') |
joshualitt | 815d571 | 2015-12-08 09:14:01 -0800 | [diff] [blame] | 86 | |
| 87 | # We want to run gpudft on atleast the mali 400 |
| 88 | if 'GalaxyS3' in bot: |
| 89 | configs.append('gpudft') |
| 90 | |
borenet | 48b88cc | 2016-04-11 10:16:01 -0700 | [diff] [blame] | 91 | # CommandBuffer bot *only* runs the command_buffer config. |
| 92 | if 'CommandBuffer' in bot: |
borenet | 903ec3c | 2016-04-13 06:00:42 -0700 | [diff] [blame] | 93 | configs = ['commandbuffer'] |
borenet | 48b88cc | 2016-04-11 10:16:01 -0700 | [diff] [blame] | 94 | |
borenet | 71e185c | 2016-04-12 08:13:56 -0700 | [diff] [blame] | 95 | # Vulkan bot *only* runs the vk config. |
| 96 | if 'Vulkan' in bot: |
| 97 | configs = ['vk'] |
| 98 | |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 99 | args.append('--config') |
| 100 | args.extend(configs) |
| 101 | |
msarett | 13a036b | 2016-02-08 09:10:47 -0800 | [diff] [blame] | 102 | # Run tests, gms, and image decoding tests everywhere. |
msarett | 13a036b | 2016-02-08 09:10:47 -0800 | [diff] [blame] | 103 | args.extend('--src tests gm image'.split(' ')) |
mtklein | 1866b57 | 2015-06-12 11:31:51 -0700 | [diff] [blame] | 104 | |
borenet | 97025e3 | 2015-04-28 09:54:55 -0700 | [diff] [blame] | 105 | if 'GalaxyS' in bot: |
| 106 | args.extend(('--threads', '0')) |
| 107 | |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 108 | blacklist = [] |
scroggo | c1121ef | 2015-07-16 12:36:10 -0700 | [diff] [blame] | 109 | |
mtklein | 7fe18a8 | 2016-03-01 12:17:33 -0800 | [diff] [blame] | 110 | # TODO: ??? |
| 111 | blacklist.extend('f16 _ _ dstreadshuffle'.split(' ')) |
| 112 | blacklist.extend('f16 image _ _'.split(' ')) |
| 113 | blacklist.extend('srgb image _ _'.split(' ')) |
brianosman | 61d3b08 | 2016-03-30 11:19:36 -0700 | [diff] [blame] | 114 | blacklist.extend('gpusrgb image _ _'.split(' ')) |
mtklein | 7fe18a8 | 2016-03-01 12:17:33 -0800 | [diff] [blame] | 115 | |
egdaniel | 89c2a54 | 2015-03-19 13:09:17 -0700 | [diff] [blame] | 116 | # Certain gm's on win7 gpu and pdf are never finishing and keeping the test |
| 117 | # running forever |
| 118 | if 'Win7' in bot: |
djsollen | 54416de | 2015-04-03 07:24:48 -0700 | [diff] [blame] | 119 | blacklist.extend('msaa16 gm _ colorwheelnative'.split(' ')) |
| 120 | blacklist.extend('pdf gm _ fontmgr_iter_factory'.split(' ')) |
egdaniel | 89c2a54 | 2015-03-19 13:09:17 -0700 | [diff] [blame] | 121 | |
mtklein | 150d350 | 2015-03-05 13:38:17 -0800 | [diff] [blame] | 122 | if 'Valgrind' in bot: |
mtklein | ce86687 | 2015-03-26 05:12:13 -0700 | [diff] [blame] | 123 | # These take 18+ hours to run. |
djsollen | 54416de | 2015-04-03 07:24:48 -0700 | [diff] [blame] | 124 | blacklist.extend('pdf gm _ fontmgr_iter'.split(' ')) |
| 125 | blacklist.extend('pdf _ _ PANO_20121023_214540.jpg'.split(' ')) |
Mike Klein | fbcf0bd | 2015-04-09 06:03:22 -0400 | [diff] [blame] | 126 | blacklist.extend('pdf skp _ worldjournal'.split(' ')) |
djsollen | 54416de | 2015-04-03 07:24:48 -0700 | [diff] [blame] | 127 | blacklist.extend('pdf skp _ desk_baidu.skp'.split(' ')) |
borenet | 22ecae8 | 2015-04-13 13:29:26 -0700 | [diff] [blame] | 128 | blacklist.extend('pdf skp _ desk_wikipedia.skp'.split(' ')) |
mtklein | 150d350 | 2015-03-05 13:38:17 -0800 | [diff] [blame] | 129 | |
stephana | deee298 | 2015-05-05 07:55:06 -0700 | [diff] [blame] | 130 | if 'iOS' in bot: |
| 131 | blacklist.extend('gpu skp _ _ msaa skp _ _'.split(' ')) |
stephana | deee298 | 2015-05-05 07:55:06 -0700 | [diff] [blame] | 132 | blacklist.extend('msaa16 gm _ tilemodesProcess'.split(' ')) |
| 133 | |
msarett | 1897631 | 2016-03-09 14:20:58 -0800 | [diff] [blame] | 134 | if 'Mac' in bot or 'iOS' in bot: |
msarett | 5a60982 | 2016-03-17 10:45:41 -0700 | [diff] [blame] | 135 | # CG fails on questionable bmps |
msarett | 1897631 | 2016-03-09 14:20:58 -0800 | [diff] [blame] | 136 | blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' ')) |
| 137 | blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' ')) |
| 138 | blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' ')) |
| 139 | blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' ')) |
| 140 | blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' ')) |
| 141 | blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' ')) |
| 142 | blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' ')) |
mtklein | d33fe1f | 2016-03-22 11:08:24 -0700 | [diff] [blame] | 143 | |
msarett | 5a60982 | 2016-03-17 10:45:41 -0700 | [diff] [blame] | 144 | # CG has unpredictable behavior on this questionable gif |
| 145 | # It's probably using uninitialized memory |
| 146 | blacklist.extend('_ image gen_platf frame_larger_than_image.gif'.split(' ')) |
msarett | 1897631 | 2016-03-09 14:20:58 -0800 | [diff] [blame] | 147 | |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 148 | # WIC fails on questionable bmps |
| 149 | if 'Win' in bot: |
| 150 | blacklist.extend('_ image gen_platf rle8-height-negative.bmp'.split(' ')) |
| 151 | blacklist.extend('_ image gen_platf rle4-height-negative.bmp'.split(' ')) |
| 152 | blacklist.extend('_ image gen_platf pal8os2v2.bmp'.split(' ')) |
| 153 | blacklist.extend('_ image gen_platf pal8os2v2-16.bmp'.split(' ')) |
| 154 | blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' ')) |
| 155 | blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' ')) |
| 156 | blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' ')) |
| 157 | blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' ')) |
| 158 | blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' ')) |
| 159 | blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' ')) |
| 160 | blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' ')) |
scroggo | 23b80c4 | 2016-05-23 14:35:52 -0700 | [diff] [blame] | 161 | if 'x86_64' in bot and 'CPU' in bot: |
| 162 | # This GM triggers a SkSmallAllocator assert. |
| 163 | blacklist.extend('_ gm _ composeshader_bitmap'.split(' ')) |
msarett | fc0b6d1 | 2016-03-17 13:50:17 -0700 | [diff] [blame] | 164 | |
mtklein | 5820fe8 | 2016-01-07 07:38:29 -0800 | [diff] [blame] | 165 | # skia:4095 |
| 166 | for test in ['not_native32_bitmap_config', |
| 167 | 'bleed_image', |
| 168 | 'bleed_alpha_image', |
| 169 | 'bleed_alpha_image_shader', |
mtklein | 5820fe8 | 2016-01-07 07:38:29 -0800 | [diff] [blame] | 170 | 'c_gms', |
| 171 | 'colortype', |
| 172 | 'colortype_xfermodes', |
mtklein | 5820fe8 | 2016-01-07 07:38:29 -0800 | [diff] [blame] | 173 | 'drawfilter', |
| 174 | 'fontmgr_bounds_0.75_0', |
| 175 | 'fontmgr_bounds_1_-0.25', |
| 176 | 'fontmgr_bounds', |
| 177 | 'fontmgr_match', |
| 178 | 'fontmgr_iter', |
mtklein | 5820fe8 | 2016-01-07 07:38:29 -0800 | [diff] [blame] | 179 | 'verylargebitmap', # Windows only. |
| 180 | 'verylarge_picture_image']: # Windows only. |
| 181 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
mtklein | 4a34ecb | 2016-01-08 10:19:35 -0800 | [diff] [blame] | 182 | # skia:4769 |
mtklein | 48156ed | 2016-04-06 14:25:35 -0700 | [diff] [blame] | 183 | for test in ['drawfilter']: |
mtklein | dd54e5d | 2016-02-29 09:51:09 -0800 | [diff] [blame] | 184 | blacklist.extend([ 'sp-8888', 'gm', '_', test]) |
| 185 | blacklist.extend([ 'pic-8888', 'gm', '_', test]) |
| 186 | blacklist.extend(['2ndpic-8888', 'gm', '_', test]) |
mtklein | 0b558cb | 2016-01-11 06:30:47 -0800 | [diff] [blame] | 187 | # skia:4703 |
| 188 | for test in ['image-cacherator-from-picture', |
| 189 | 'image-cacherator-from-raster', |
| 190 | 'image-cacherator-from-ctable']: |
mtklein | dd54e5d | 2016-02-29 09:51:09 -0800 | [diff] [blame] | 191 | blacklist.extend([ 'sp-8888', 'gm', '_', test]) |
mtklein | 0b558cb | 2016-01-11 06:30:47 -0800 | [diff] [blame] | 192 | blacklist.extend([ 'pic-8888', 'gm', '_', test]) |
mtklein | dd54e5d | 2016-02-29 09:51:09 -0800 | [diff] [blame] | 193 | blacklist.extend([ '2ndpic-8888', 'gm', '_', test]) |
mtklein | 0b558cb | 2016-01-11 06:30:47 -0800 | [diff] [blame] | 194 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
mtklein | 5820fe8 | 2016-01-07 07:38:29 -0800 | [diff] [blame] | 195 | |
scroggo | 3ac66e9 | 2016-02-08 15:09:48 -0800 | [diff] [blame] | 196 | # Extensions for RAW images |
msarett | 772cc40 | 2016-02-08 11:43:50 -0800 | [diff] [blame] | 197 | r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", |
| 198 | "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"] |
| 199 | |
msarett | 772cc40 | 2016-02-08 11:43:50 -0800 | [diff] [blame] | 200 | # skbug.com/4888 |
mtklein | bee39c5 | 2016-03-22 12:36:01 -0700 | [diff] [blame] | 201 | # Blacklist RAW images (and a few large PNGs) on GPU bots |
| 202 | # until we can resolve failures |
msarett | 772cc40 | 2016-02-08 11:43:50 -0800 | [diff] [blame] | 203 | if 'GPU' in bot: |
mtklein | bee39c5 | 2016-03-22 12:36:01 -0700 | [diff] [blame] | 204 | blacklist.extend('_ image _ interlaced1.png'.split(' ')) |
| 205 | blacklist.extend('_ image _ interlaced2.png'.split(' ')) |
| 206 | blacklist.extend('_ image _ interlaced3.png'.split(' ')) |
scroggo | 1497f9f | 2016-02-02 11:56:33 -0800 | [diff] [blame] | 207 | for raw_ext in r: |
| 208 | blacklist.extend(('_ image _ .%s' % raw_ext).split(' ')) |
| 209 | |
brianosman | 8c7d7ad | 2016-03-24 10:33:42 -0700 | [diff] [blame] | 210 | # Large image that overwhelms older Mac bots |
| 211 | if 'MacMini4.1-GPU' in bot: |
| 212 | blacklist.extend('_ image _ abnormal.wbmp'.split(' ')) |
| 213 | |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 214 | match = [] |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 215 | if 'Valgrind' in bot: # skia:3021 |
| 216 | match.append('~Threaded') |
mtklein | accaf48 | 2015-11-18 07:56:30 -0800 | [diff] [blame] | 217 | |
borenet | 97025e3 | 2015-04-28 09:54:55 -0700 | [diff] [blame] | 218 | if 'GalaxyS3' in bot: # skia:1699 |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 219 | match.append('~WritePixels') |
mtklein | 5820fe8 | 2016-01-07 07:38:29 -0800 | [diff] [blame] | 220 | |
joshualitt | 4541f6e | 2015-12-15 10:46:21 -0800 | [diff] [blame] | 221 | if 'AndroidOne' in bot: # skia:4711 |
| 222 | match.append('~WritePixels') |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 223 | |
mtklein | 4e2d3be | 2015-03-10 11:55:18 -0700 | [diff] [blame] | 224 | if 'NexusPlayer' in bot: |
| 225 | match.append('~ResourceCache') |
| 226 | |
borenet | 9b8d358 | 2015-07-21 05:57:22 -0700 | [diff] [blame] | 227 | if 'GalaxyS4' in bot: # skia:4079 |
| 228 | match.append('~imagefiltersclipped') |
egdaniel | ccb88bc | 2015-10-06 11:20:09 -0700 | [diff] [blame] | 229 | match.append('~imagefilterscropexpand') |
borenet | cf72ed6 | 2015-08-25 06:53:37 -0700 | [diff] [blame] | 230 | match.append('~scaled_tilemodes_npot') |
benjaminwagner | 6fccec3 | 2015-09-24 06:39:06 -0700 | [diff] [blame] | 231 | match.append('~bleed_image') # skia:4367 |
| 232 | match.append('~ReadPixels') # skia:4368 |
borenet | 9b8d358 | 2015-07-21 05:57:22 -0700 | [diff] [blame] | 233 | |
joshualitt | b81ceca | 2015-12-18 06:50:59 -0800 | [diff] [blame] | 234 | if 'ANGLE' in bot and 'Debug' in bot: |
| 235 | match.append('~GLPrograms') # skia:4717 |
| 236 | |
mtklein | 517558a | 2016-02-18 11:42:00 -0800 | [diff] [blame] | 237 | if 'MSAN' in bot: |
| 238 | match.extend(['~Once', '~Shared']) # Not sure what's up with these tests. |
| 239 | |
stephana | 338eaea | 2016-04-27 06:50:03 -0700 | [diff] [blame] | 240 | if 'TSAN' in bot: |
| 241 | match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots. |
| 242 | |
mtklein | e721a8e | 2016-02-06 19:12:23 -0800 | [diff] [blame] | 243 | if blacklist: |
| 244 | args.append('--blacklist') |
| 245 | args.extend(blacklist) |
| 246 | |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 247 | if match: |
| 248 | args.append('--match') |
| 249 | args.extend(match) |
| 250 | |
scroggo | 3ac66e9 | 2016-02-08 15:09:48 -0800 | [diff] [blame] | 251 | # These bots run out of memory running RAW codec tests. Do not run them in |
| 252 | # parallel |
scroggo | 00e9452 | 2016-05-10 06:11:20 -0700 | [diff] [blame] | 253 | if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot |
| 254 | or 'Win8-MSVC-ShuttleB' in bot): |
scroggo | 3ac66e9 | 2016-02-08 15:09:48 -0800 | [diff] [blame] | 255 | args.append('--noRAW_threading') |
| 256 | |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 257 | return args |
| 258 | cov_end = lineno() # Don't care about code coverage past here. |
| 259 | |
| 260 | |
| 261 | def self_test(): |
| 262 | import coverage # This way the bots don't need coverage.py to be installed. |
| 263 | args = {} |
| 264 | cases = [ |
mtklein | e4b19c4 | 2015-05-05 10:28:44 -0700 | [diff] [blame] | 265 | 'Pretend-iOS-Bot', |
joshualitt | 4541f6e | 2015-12-15 10:46:21 -0800 | [diff] [blame] | 266 | 'Test-Android-GCC-AndroidOne-GPU-Mali400MP2-Arm7-Release', |
borenet | 1e37d17 | 2015-03-27 05:42:18 -0700 | [diff] [blame] | 267 | 'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug', |
mtklein | e4b19c4 | 2015-05-05 10:28:44 -0700 | [diff] [blame] | 268 | 'Test-Android-GCC-GalaxyS4-GPU-SGX544-Arm7-Release', |
borenet | 1e37d17 | 2015-03-27 05:42:18 -0700 | [diff] [blame] | 269 | 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release', |
borenet | 48b88cc | 2016-04-11 10:16:01 -0700 | [diff] [blame] | 270 | 'Test-Android-GCC-Nexus9-GPU-TegraK1-Arm64-Debug', |
borenet | 1e37d17 | 2015-03-27 05:42:18 -0700 | [diff] [blame] | 271 | 'Test-Android-GCC-NexusPlayer-CPU-SSSE3-x86-Release', |
borenet | 48b88cc | 2016-04-11 10:16:01 -0700 | [diff] [blame] | 272 | 'Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Release', |
| 273 | 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release', |
| 274 | 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', |
| 275 | 'Test-Mac10.8-Clang-MacMini4.1-CPU-SSE4-x86_64-Release', |
mtklein | e721a8e | 2016-02-06 19:12:23 -0800 | [diff] [blame] | 276 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN', |
borenet | 1e37d17 | 2015-03-27 05:42:18 -0700 | [diff] [blame] | 277 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN', |
| 278 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind', |
borenet | 48b88cc | 2016-04-11 10:16:01 -0700 | [diff] [blame] | 279 | 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
borenet | ac26aa6 | 2016-05-18 08:12:51 -0700 | [diff] [blame] | 280 | 'Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', |
borenet | 71e185c | 2016-04-12 08:13:56 -0700 | [diff] [blame] | 281 | 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan', |
borenet | 1e37d17 | 2015-03-27 05:42:18 -0700 | [diff] [blame] | 282 | 'Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE', |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 283 | ] |
| 284 | |
| 285 | cov = coverage.coverage() |
| 286 | cov.start() |
| 287 | for case in cases: |
mtklein | f73e589 | 2015-02-24 11:45:11 -0800 | [diff] [blame] | 288 | args[case] = get_args(case) |
mtklein | 11a2c50 | 2015-02-24 09:25:16 -0800 | [diff] [blame] | 289 | cov.stop() |
| 290 | |
| 291 | this_file = os.path.basename(__file__) |
| 292 | _, _, not_run, _ = cov.analysis(this_file) |
| 293 | filtered = [line for line in not_run if line > cov_start and line < cov_end] |
| 294 | if filtered: |
| 295 | print 'Lines not covered by test cases: ', filtered |
| 296 | sys.exit(1) |
| 297 | |
| 298 | golden = this_file.replace('.py', '.json') |
| 299 | with open(os.path.join(os.path.dirname(__file__), golden), 'w') as f: |
| 300 | json.dump(args, f, indent=2, sort_keys=True) |
| 301 | |
| 302 | |
| 303 | if __name__ == '__main__': |
| 304 | if len(sys.argv) == 2 and sys.argv[1] == 'test': |
| 305 | self_test() |
| 306 | sys.exit(0) |
| 307 | |
| 308 | if len(sys.argv) != 3: |
| 309 | print usage |
| 310 | sys.exit(1) |
| 311 | |
| 312 | with open(sys.argv[1], 'w') as out: |
mtklein | f73e589 | 2015-02-24 11:45:11 -0800 | [diff] [blame] | 313 | json.dump(get_args(sys.argv[2]), out) |