| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2011 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 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 __doc__ = """ | 7 __doc__ = """ |
| 8 gyptest.py -- test runner for GYP tests. | 8 gyptest.py -- test runner for GYP tests. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import os | 11 import os |
| 12 import optparse | 12 import optparse |
| 13 import subprocess | 13 import subprocess |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 no_result = [] | 202 no_result = [] |
| 203 | 203 |
| 204 if opts.format: | 204 if opts.format: |
| 205 format_list = opts.format.split(',') | 205 format_list = opts.format.split(',') |
| 206 else: | 206 else: |
| 207 # TODO: not duplicate this mapping from pylib/gyp/__init__.py | 207 # TODO: not duplicate this mapping from pylib/gyp/__init__.py |
| 208 format_list = { | 208 format_list = { |
| 209 'freebsd7': ['make'], | 209 'freebsd7': ['make'], |
| 210 'freebsd8': ['make'], | 210 'freebsd8': ['make'], |
| 211 'cygwin': ['msvs'], | 211 'cygwin': ['msvs'], |
| 212 'win32': ['msvs'], | 212 'win32': ['msvs', 'ninja'], |
| 213 'linux2': ['make', 'ninja'], | 213 'linux2': ['make', 'ninja'], |
| 214 'linux3': ['make', 'ninja'], | 214 'linux3': ['make', 'ninja'], |
| 215 'darwin': ['make', 'ninja', 'xcode'], | 215 'darwin': ['make', 'ninja', 'xcode'], |
| 216 }[sys.platform] | 216 }[sys.platform] |
| 217 | 217 |
| 218 for format in format_list: | 218 for format in format_list: |
| 219 os.environ['TESTGYP_FORMAT'] = format | 219 os.environ['TESTGYP_FORMAT'] = format |
| 220 if not opts.quiet: | 220 if not opts.quiet: |
| 221 sys.stdout.write('TESTGYP_FORMAT=%s\n' % format) | 221 sys.stdout.write('TESTGYP_FORMAT=%s\n' % format) |
| 222 | 222 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 247 report("No result from", no_result) | 247 report("No result from", no_result) |
| 248 | 248 |
| 249 if failed: | 249 if failed: |
| 250 return 1 | 250 return 1 |
| 251 else: | 251 else: |
| 252 return 0 | 252 return 0 |
| 253 | 253 |
| 254 | 254 |
| 255 if __name__ == "__main__": | 255 if __name__ == "__main__": |
| 256 sys.exit(main()) | 256 sys.exit(main()) |
| OLD | NEW |