OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2011 the V8 project authors. All rights reserved. | 3 # Copyright 2011 the V8 project authors. All rights reserved. |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
66 default='ia32,x64,arm') | 66 default='ia32,x64,arm') |
67 | 67 |
68 # Flags that are passed on to the wrapped test.py script: | 68 # Flags that are passed on to the wrapped test.py script: |
69 result.add_option("-v", "--verbose", help="Verbose output", | 69 result.add_option("-v", "--verbose", help="Verbose output", |
70 default=False, action="store_true") | 70 default=False, action="store_true") |
71 result.add_option("-p", "--progress", | 71 result.add_option("-p", "--progress", |
72 help="The style of progress indicator (verbose, dots, color, mono)", | 72 help="The style of progress indicator (verbose, dots, color, mono)", |
73 choices=PROGRESS_INDICATORS, default="mono") | 73 choices=PROGRESS_INDICATORS, default="mono") |
74 result.add_option("--report", help="Print a summary of the tests to be run", | 74 result.add_option("--report", help="Print a summary of the tests to be run", |
75 default=False, action="store_true") | 75 default=False, action="store_true") |
76 result.add_option("--download-data", help="Download missing test suite dara", | |
Yang
2012/03/07 12:30:35
Which dara do you mean? http://en.wikipedia.org/wi
| |
77 default=False, action="store_true") | |
76 result.add_option("-s", "--suite", help="A test suite", | 78 result.add_option("-s", "--suite", help="A test suite", |
77 default=[], action="append") | 79 default=[], action="append") |
78 result.add_option("-t", "--timeout", help="Timeout in seconds", | 80 result.add_option("-t", "--timeout", help="Timeout in seconds", |
79 default=60, type="int") | 81 default=60, type="int") |
80 result.add_option("--snapshot", help="Run the tests with snapshot turned on", | 82 result.add_option("--snapshot", help="Run the tests with snapshot turned on", |
81 default=False, action="store_true") | 83 default=False, action="store_true") |
82 result.add_option("--special-command", default=None) | 84 result.add_option("--special-command", default=None) |
83 result.add_option("--valgrind", help="Run tests through valgrind", | 85 result.add_option("--valgrind", help="Run tests through valgrind", |
84 default=False, action="store_true") | 86 default=False, action="store_true") |
85 result.add_option("--cat", help="Print the source of the tests", | 87 result.add_option("--cat", help="Print the source of the tests", |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 | 156 |
155 | 157 |
156 def PassOnOptions(options): | 158 def PassOnOptions(options): |
157 result = [] | 159 result = [] |
158 if options.verbose: | 160 if options.verbose: |
159 result += ['--verbose'] | 161 result += ['--verbose'] |
160 if options.progress != 'mono': | 162 if options.progress != 'mono': |
161 result += ['--progress=' + options.progress] | 163 result += ['--progress=' + options.progress] |
162 if options.report: | 164 if options.report: |
163 result += ['--report'] | 165 result += ['--report'] |
166 if options.download_data: | |
167 result += ['--download-data'] | |
164 if options.suite != []: | 168 if options.suite != []: |
165 for suite in options.suite: | 169 for suite in options.suite: |
166 result += ['--suite=../../test/' + suite] | 170 result += ['--suite=../../test/' + suite] |
167 if options.timeout != 60: | 171 if options.timeout != 60: |
168 result += ['--timeout=%s' % options.timeout] | 172 result += ['--timeout=%s' % options.timeout] |
169 if options.snapshot: | 173 if options.snapshot: |
170 result += ['--snapshot'] | 174 result += ['--snapshot'] |
171 if options.special_command: | 175 if options.special_command: |
172 result += ['--special-command="%s"' % options.special_command] | 176 result += ['--special-command="%s"' % options.special_command] |
173 if options.valgrind: | 177 if options.valgrind: |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 shell=True, | 250 shell=True, |
247 cwd=workspace, | 251 cwd=workspace, |
248 env=env) | 252 env=env) |
249 returncodes = child.wait() | 253 returncodes = child.wait() |
250 | 254 |
251 return returncodes | 255 return returncodes |
252 | 256 |
253 | 257 |
254 if __name__ == '__main__': | 258 if __name__ == '__main__': |
255 sys.exit(Main()) | 259 sys.exit(Main()) |
OLD | NEW |