OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 usage = ''' | 3 usage = ''' |
4 Write extra flags to outfile for DM based on the bot name: | 4 Write extra flags to outfile for DM based on the bot name: |
5 $ python dm_flags.py outfile Test-Mac10.9-MacMini6.2-HD4000-x86_64-Release | 5 $ python dm_flags.py outfile Test-Mac10.9-MacMini6.2-HD4000-x86_64-Release |
6 Or run self-tests: | 6 Or run self-tests: |
7 $ python dm_flags.py test | 7 $ python dm_flags.py test |
8 ''' | 8 ''' |
9 | 9 |
10 import inspect | 10 import inspect |
11 import json | 11 import json |
12 import os | 12 import os |
13 import sys | 13 import sys |
14 | 14 |
15 | 15 |
16 def lineno(): | 16 def lineno(): |
17 caller = inspect.stack()[1] # Up one level to our caller. | 17 caller = inspect.stack()[1] # Up one level to our caller. |
18 return inspect.getframeinfo(caller[0]).lineno | 18 return inspect.getframeinfo(caller[0]).lineno |
19 | 19 |
20 | 20 |
21 cov_start = lineno()+1 # We care about coverage starting just past this def. | 21 cov_start = lineno()+1 # We care about coverage starting just past this def. |
22 def get_args(bot): | 22 def get_args(bot): |
23 args = [] | 23 args = [] |
24 | 24 |
25 configs = ['565', '8888', 'gpu', 'nvprmsaa4'] | 25 configs = ['565', '8888', 'gpu', 'nvprmsaa4'] |
| 26 if 'Android' in bot: |
| 27 configs.append('msaa4') |
| 28 else: |
| 29 configs.append('msaa16') |
26 # Xoom and NP are running out of RAM when we run all these modes. skia:3255 | 30 # Xoom and NP are running out of RAM when we run all these modes. skia:3255 |
27 if ('Xoom' not in bot and | 31 if ('Xoom' not in bot and |
28 'NexusPlayer' not in bot): | 32 'NexusPlayer' not in bot): |
29 configs.extend(mode + '-8888' for mode in | 33 configs.extend(mode + '-8888' for mode in |
30 ['serialize', 'tiles_rt', 'pipe']) | 34 ['serialize', 'tiles_rt', 'pipe']) |
31 configs.append('tiles_rt-gpu') | 35 configs.append('tiles_rt-gpu') |
32 if 'ANGLE' in bot: | 36 if 'ANGLE' in bot: |
33 configs.append('angle') | 37 configs.append('angle') |
34 args.append('--config') | 38 args.append('--config') |
35 args.extend(configs) | 39 args.extend(configs) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 if len(sys.argv) == 2 and sys.argv[1] == 'test': | 117 if len(sys.argv) == 2 and sys.argv[1] == 'test': |
114 self_test() | 118 self_test() |
115 sys.exit(0) | 119 sys.exit(0) |
116 | 120 |
117 if len(sys.argv) != 3: | 121 if len(sys.argv) != 3: |
118 print usage | 122 print usage |
119 sys.exit(1) | 123 sys.exit(1) |
120 | 124 |
121 with open(sys.argv[1], 'w') as out: | 125 with open(sys.argv[1], 'w') as out: |
122 json.dump(get_args(sys.argv[2]), out) | 126 json.dump(get_args(sys.argv[2]), out) |
OLD | NEW |