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'] | 25 configs = ['565', '8888', 'pdf', 'gpu'] |
26 # The S4 crashes and the NP produces a long error stream when we run with | 26 # The S4 crashes and the NP produces a long error stream when we run with |
27 # MSAA. | 27 # MSAA. |
28 if ('GalaxyS4' not in bot and | 28 if ('GalaxyS4' not in bot and |
29 'NexusPlayer' not in bot): | 29 'NexusPlayer' not in bot): |
30 if 'Android' in bot: | 30 if 'Android' in bot: |
31 configs.extend(['msaa4', 'nvprmsaa4']) | 31 configs.extend(['msaa4', 'nvprmsaa4']) |
32 else: | 32 else: |
33 configs.extend(['msaa16', 'nvprmsaa16']) | 33 configs.extend(['msaa16', 'nvprmsaa16']) |
34 | 34 |
35 # Xoom and NP are running out of RAM when we run all these modes. skia:3255 | 35 # Xoom and NP are running out of RAM when we run all these modes. skia:3255 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 if len(sys.argv) == 2 and sys.argv[1] == 'test': | 122 if len(sys.argv) == 2 and sys.argv[1] == 'test': |
123 self_test() | 123 self_test() |
124 sys.exit(0) | 124 sys.exit(0) |
125 | 125 |
126 if len(sys.argv) != 3: | 126 if len(sys.argv) != 3: |
127 print usage | 127 print usage |
128 sys.exit(1) | 128 sys.exit(1) |
129 | 129 |
130 with open(sys.argv[1], 'w') as out: | 130 with open(sys.argv[1], 'w') as out: |
131 json.dump(get_args(sys.argv[2]), out) | 131 json.dump(get_args(sys.argv[2]), out) |
OLD | NEW |