| 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 collections | 9 import collections |
| 10 from contextlib import contextmanager | 10 from contextlib import contextmanager |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 of TestGypBase for Visual Studio. | 699 of TestGypBase for Visual Studio. |
| 700 | 700 |
| 701 We use the value specified by GYP_MSVS_VERSION. If not specified, we | 701 We use the value specified by GYP_MSVS_VERSION. If not specified, we |
| 702 search %PATH% and %PATHEXT% for a devenv.{exe,bat,...} executable. | 702 search %PATH% and %PATHEXT% for a devenv.{exe,bat,...} executable. |
| 703 Failing that, we search for likely deployment paths. | 703 Failing that, we search for likely deployment paths. |
| 704 """ | 704 """ |
| 705 possible_roots = ['%s:\\Program Files%s' % (chr(drive), suffix) | 705 possible_roots = ['%s:\\Program Files%s' % (chr(drive), suffix) |
| 706 for drive in range(ord('C'), ord('Z') + 1) | 706 for drive in range(ord('C'), ord('Z') + 1) |
| 707 for suffix in ['', ' (x86)']] | 707 for suffix in ['', ' (x86)']] |
| 708 possible_paths = { | 708 possible_paths = { |
| 709 '2015': r'Microsoft Visual Studio 14.0\Common7\IDE\devenv.com', |
| 709 '2013': r'Microsoft Visual Studio 12.0\Common7\IDE\devenv.com', | 710 '2013': r'Microsoft Visual Studio 12.0\Common7\IDE\devenv.com', |
| 710 '2012': r'Microsoft Visual Studio 11.0\Common7\IDE\devenv.com', | 711 '2012': r'Microsoft Visual Studio 11.0\Common7\IDE\devenv.com', |
| 711 '2010': r'Microsoft Visual Studio 10.0\Common7\IDE\devenv.com', | 712 '2010': r'Microsoft Visual Studio 10.0\Common7\IDE\devenv.com', |
| 712 '2008': r'Microsoft Visual Studio 9.0\Common7\IDE\devenv.com', | 713 '2008': r'Microsoft Visual Studio 9.0\Common7\IDE\devenv.com', |
| 713 '2005': r'Microsoft Visual Studio 8\Common7\IDE\devenv.com'} | 714 '2005': r'Microsoft Visual Studio 8\Common7\IDE\devenv.com'} |
| 714 | 715 |
| 715 possible_roots = [ConvertToCygpath(r) for r in possible_roots] | 716 possible_roots = [ConvertToCygpath(r) for r in possible_roots] |
| 716 | 717 |
| 717 msvs_version = 'auto' | 718 msvs_version = 'auto' |
| 718 for flag in (f for f in sys.argv if f.startswith('msvs_version=')): | 719 for flag in (f for f in sys.argv if f.startswith('msvs_version=')): |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 | 1182 |
| 1182 def TestGyp(*args, **kw): | 1183 def TestGyp(*args, **kw): |
| 1183 """ | 1184 """ |
| 1184 Returns an appropriate TestGyp* instance for a specified GYP format. | 1185 Returns an appropriate TestGyp* instance for a specified GYP format. |
| 1185 """ | 1186 """ |
| 1186 format = kw.pop('format', os.environ.get('TESTGYP_FORMAT')) | 1187 format = kw.pop('format', os.environ.get('TESTGYP_FORMAT')) |
| 1187 for format_class in format_class_list: | 1188 for format_class in format_class_list: |
| 1188 if format == format_class.format: | 1189 if format == format_class.format: |
| 1189 return format_class(*args, **kw) | 1190 return format_class(*args, **kw) |
| 1190 raise Exception, "unknown format %r" % format | 1191 raise Exception, "unknown format %r" % format |
| OLD | NEW |