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

Side by Side Diff: test/mac/gyptest-objc-gc.py

Issue 10399072: Allow multiple possibe error codes for the "status" parameter. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« test/lib/TestCommon.py ('K') | « test/lib/TestCommon.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 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 """ 7 """
8 Verifies that objc settings are handled correctly. 8 Verifies that objc settings are handled correctly.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 import sys 13 import sys
14 14
15 if sys.platform == 'darwin': 15 if sys.platform == 'darwin':
16 # set |match| to ignore build stderr output. 16 # set |match| to ignore build stderr output.
17 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'], 17 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'],
18 match = lambda a, b: True) 18 match = lambda a, b: True)
19 19
20 CHDIR = 'objc-gc' 20 CHDIR = 'objc-gc'
21 test.run_gyp('test.gyp', chdir=CHDIR) 21 test.run_gyp('test.gyp', chdir=CHDIR)
22 22
23 build_error_code = { 23 build_error_code = {
24 'xcode': 1, # Linker error code. 1 on Xcode 3, 65 on Xcode 4 :-/ 24 'xcode': [1, 65], # Linker error code. 1 on Xcode 3, 65 on Xcode 4
25 'make': 2, 25 'make': 2,
26 'ninja': 1, 26 'ninja': 1,
27 }[test.format] 27 }[test.format]
28 28
29 test.build('test.gyp', 'gc_exe_fails', chdir=CHDIR, status=build_error_code) 29 test.build('test.gyp', 'gc_exe_fails', chdir=CHDIR, status=build_error_code)
30 test.build( 30 test.build(
31 'test.gyp', 'gc_off_exe_req_lib', chdir=CHDIR, status=build_error_code) 31 'test.gyp', 'gc_off_exe_req_lib', chdir=CHDIR, status=build_error_code)
32 32
33 test.build('test.gyp', 'gc_req_exe', chdir=CHDIR) 33 test.build('test.gyp', 'gc_req_exe', chdir=CHDIR)
34 test.run_built_executable('gc_req_exe', chdir=CHDIR, stdout="gc on: 1\n") 34 test.run_built_executable('gc_req_exe', chdir=CHDIR, stdout="gc on: 1\n")
35 35
36 test.build('test.gyp', 'gc_exe_req_lib', chdir=CHDIR) 36 test.build('test.gyp', 'gc_exe_req_lib', chdir=CHDIR)
37 test.run_built_executable('gc_exe_req_lib', chdir=CHDIR, stdout="gc on: 1\n") 37 test.run_built_executable('gc_exe_req_lib', chdir=CHDIR, stdout="gc on: 1\n")
38 38
39 test.build('test.gyp', 'gc_exe', chdir=CHDIR) 39 test.build('test.gyp', 'gc_exe', chdir=CHDIR)
40 test.run_built_executable('gc_exe', chdir=CHDIR, stdout="gc on: 1\n") 40 test.run_built_executable('gc_exe', chdir=CHDIR, stdout="gc on: 1\n")
41 41
42 test.build('test.gyp', 'gc_off_exe', chdir=CHDIR) 42 test.build('test.gyp', 'gc_off_exe', chdir=CHDIR)
43 test.run_built_executable('gc_off_exe', chdir=CHDIR, stdout="gc on: 0\n") 43 test.run_built_executable('gc_off_exe', chdir=CHDIR, stdout="gc on: 0\n")
44 44
45 test.pass_test() 45 test.pass_test()
OLDNEW
« test/lib/TestCommon.py ('K') | « test/lib/TestCommon.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698