| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 TestGyp.py: a testing framework for GYP integration tests. | 6 TestGyp.py: a testing framework for GYP integration tests. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 of TestGypBase for Visual Studio. | 632 of TestGypBase for Visual Studio. |
| 633 | 633 |
| 634 We use the value specified by GYP_MSVS_VERSION. If not specified, we | 634 We use the value specified by GYP_MSVS_VERSION. If not specified, we |
| 635 search %PATH% and %PATHEXT% for a devenv.{exe,bat,...} executable. | 635 search %PATH% and %PATHEXT% for a devenv.{exe,bat,...} executable. |
| 636 Failing that, we search for likely deployment paths. | 636 Failing that, we search for likely deployment paths. |
| 637 """ | 637 """ |
| 638 possible_roots = ['%s:\\Program Files%s' % (chr(drive), suffix) | 638 possible_roots = ['%s:\\Program Files%s' % (chr(drive), suffix) |
| 639 for drive in range(ord('C'), ord('Z') + 1) | 639 for drive in range(ord('C'), ord('Z') + 1) |
| 640 for suffix in ['', ' (x86)']] | 640 for suffix in ['', ' (x86)']] |
| 641 possible_paths = { | 641 possible_paths = { |
| 642 '2013': r'Microsoft Visual Studio 12.0\Common7\IDE\devenv.com', |
| 642 '2012': r'Microsoft Visual Studio 11.0\Common7\IDE\devenv.com', | 643 '2012': r'Microsoft Visual Studio 11.0\Common7\IDE\devenv.com', |
| 643 '2010': r'Microsoft Visual Studio 10.0\Common7\IDE\devenv.com', | 644 '2010': r'Microsoft Visual Studio 10.0\Common7\IDE\devenv.com', |
| 644 '2008': r'Microsoft Visual Studio 9.0\Common7\IDE\devenv.com', | 645 '2008': r'Microsoft Visual Studio 9.0\Common7\IDE\devenv.com', |
| 645 '2005': r'Microsoft Visual Studio 8\Common7\IDE\devenv.com'} | 646 '2005': r'Microsoft Visual Studio 8\Common7\IDE\devenv.com'} |
| 646 | 647 |
| 647 possible_roots = [ConvertToCygpath(r) for r in possible_roots] | 648 possible_roots = [ConvertToCygpath(r) for r in possible_roots] |
| 648 | 649 |
| 649 msvs_version = 'auto' | 650 msvs_version = 'auto' |
| 650 for flag in (f for f in sys.argv if f.startswith('msvs_version=')): | 651 for flag in (f for f in sys.argv if f.startswith('msvs_version=')): |
| 651 msvs_version = flag.split('=')[-1] | 652 msvs_version = flag.split('=')[-1] |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 | 1002 |
| 1002 def TestGyp(*args, **kw): | 1003 def TestGyp(*args, **kw): |
| 1003 """ | 1004 """ |
| 1004 Returns an appropriate TestGyp* instance for a specified GYP format. | 1005 Returns an appropriate TestGyp* instance for a specified GYP format. |
| 1005 """ | 1006 """ |
| 1006 format = kw.pop('format', os.environ.get('TESTGYP_FORMAT')) | 1007 format = kw.pop('format', os.environ.get('TESTGYP_FORMAT')) |
| 1007 for format_class in format_class_list: | 1008 for format_class in format_class_list: |
| 1008 if format == format_class.format: | 1009 if format == format_class.format: |
| 1009 return format_class(*args, **kw) | 1010 return format_class(*args, **kw) |
| 1010 raise Exception, "unknown format %r" % format | 1011 raise Exception, "unknown format %r" % format |
| OLD | NEW |