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

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

Issue 1710543002: Fix tests with Xcode 7. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | test/mac/gyptest-xcode-gcc.py » ('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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 1041
1042 # Work around spurious stderr output from Xcode 4, http://crbug.com/181012 1042 # Work around spurious stderr output from Xcode 4, http://crbug.com/181012
1043 match = kw.pop('match', self.match) 1043 match = kw.pop('match', self.match)
1044 def match_filter_xcode(actual, expected): 1044 def match_filter_xcode(actual, expected):
1045 if actual: 1045 if actual:
1046 if not TestCmd.is_List(actual): 1046 if not TestCmd.is_List(actual):
1047 actual = actual.split('\n') 1047 actual = actual.split('\n')
1048 if not TestCmd.is_List(expected): 1048 if not TestCmd.is_List(expected):
1049 expected = expected.split('\n') 1049 expected = expected.split('\n')
1050 actual = [a for a in actual 1050 actual = [a for a in actual
1051 if 'No recorder, buildTask: <Xcode3BuildTask:' not in a] 1051 if 'No recorder, buildTask: <Xcode3BuildTask:' not in a and
1052 'Beginning test session' not in a]
1052 return match(actual, expected) 1053 return match(actual, expected)
1053 kw['match'] = match_filter_xcode 1054 kw['match'] = match_filter_xcode
1054 1055
1055 return self.run(program=self.build_tool, **kw) 1056 return self.run(program=self.build_tool, **kw)
1056 def up_to_date(self, gyp_file, target=None, **kw): 1057 def up_to_date(self, gyp_file, target=None, **kw):
1057 """ 1058 """
1058 Verifies that a build of the specified Xcode target is up to date. 1059 Verifies that a build of the specified Xcode target is up to date.
1059 """ 1060 """
1060 result = self.build(gyp_file, target, **kw) 1061 result = self.build(gyp_file, target, **kw)
1061 if not result: 1062 if not result:
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 1181
1181 def TestGyp(*args, **kw): 1182 def TestGyp(*args, **kw):
1182 """ 1183 """
1183 Returns an appropriate TestGyp* instance for a specified GYP format. 1184 Returns an appropriate TestGyp* instance for a specified GYP format.
1184 """ 1185 """
1185 format = kw.pop('format', os.environ.get('TESTGYP_FORMAT')) 1186 format = kw.pop('format', os.environ.get('TESTGYP_FORMAT'))
1186 for format_class in format_class_list: 1187 for format_class in format_class_list:
1187 if format == format_class.format: 1188 if format == format_class.format:
1188 return format_class(*args, **kw) 1189 return format_class(*args, **kw)
1189 raise Exception, "unknown format %r" % format 1190 raise Exception, "unknown format %r" % format
OLDNEW
« no previous file with comments | « no previous file | test/mac/gyptest-xcode-gcc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698