Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: test/lib/TestGyp.py

Issue 1845943002: Enabling /ZW (CompileAsWinRT) option for msvs (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Changes based on code review feedback (iteration #2) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/win/compiler-flags/compile-as-winrt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/win/compiler-flags/compile-as-winrt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698