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

Side by Side Diff: test/mac/gyptest-archs.py

Issue 157583011: Fix generation for ninja of multiarch executable targets (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
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 Tests things related to ARCHS. 8 Tests things related to ARCHS.
9 """ 9 """
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 expected_type = '^Mach-O executable i386$' 46 expected_type = '^Mach-O executable i386$'
47 CheckFileType(result_file, expected_type) 47 CheckFileType(result_file, expected_type)
48 48
49 test.run_gyp('test-archs-x86_64.gyp', chdir='archs') 49 test.run_gyp('test-archs-x86_64.gyp', chdir='archs')
50 test.build('test-archs-x86_64.gyp', test.ALL, chdir='archs') 50 test.build('test-archs-x86_64.gyp', test.ALL, chdir='archs')
51 result_file = test.built_file_path('Test64', chdir='archs') 51 result_file = test.built_file_path('Test64', chdir='archs')
52 test.must_exist(result_file) 52 test.must_exist(result_file)
53 CheckFileType(result_file, '^Mach-O 64-bit executable x86_64$') 53 CheckFileType(result_file, '^Mach-O 64-bit executable x86_64$')
54 54
55 if test.format != 'make': 55 if test.format != 'make':
56 # Build all targets except 'exe_32_64_no_sources' that does build
57 # but should not cause error when generating ninja files
58 targets = [
59 'static_32_64', 'shared_32_64', 'module_32_64', 'exe_32_64',
60 'exe_32_64_bundle', 'precompiled_prefix_header_mm_32_64',
61 ]
62
56 test.run_gyp('test-archs-multiarch.gyp', chdir='archs') 63 test.run_gyp('test-archs-multiarch.gyp', chdir='archs')
57 test.build('test-archs-multiarch.gyp', test.ALL, chdir='archs') 64 for target in targets:
65 test.build('test-archs-multiarch.gyp', target=target, chdir='archs')
58 66
59 result_file = test.built_file_path( 67 result_file = test.built_file_path(
60 'static_32_64', chdir='archs', type=test.STATIC_LIB) 68 'static_32_64', chdir='archs', type=test.STATIC_LIB)
61 test.must_exist(result_file) 69 test.must_exist(result_file)
62 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures' 70 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures'
63 '.*architecture i386.*architecture x86_64') 71 '.*architecture i386.*architecture x86_64')
64 72
65 result_file = test.built_file_path( 73 result_file = test.built_file_path(
66 'shared_32_64', chdir='archs', type=test.SHARED_LIB) 74 'shared_32_64', chdir='archs', type=test.SHARED_LIB)
67 test.must_exist(result_file) 75 test.must_exist(result_file)
68 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures' 76 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures'
69 '.*architecture i386.*architecture x86_64') 77 '.*architecture i386.*architecture x86_64')
70 78
71 result_file = test.built_file_path( 79 result_file = test.built_file_path(
72 'exe_32_64', chdir='archs', type=test.EXECUTABLE) 80 'exe_32_64', chdir='archs', type=test.EXECUTABLE)
73 test.must_exist(result_file) 81 test.must_exist(result_file)
74 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures' 82 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures'
75 '.*architecture i386.*architecture x86_64') 83 '.*architecture i386.*architecture x86_64')
76 84
77 result_file = test.built_file_path('Test App.app/Contents/MacOS/Test App', 85 result_file = test.built_file_path('Test App.app/Contents/MacOS/Test App',
78 chdir='archs') 86 chdir='archs')
79 test.must_exist(result_file) 87 test.must_exist(result_file)
80 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures' 88 CheckFileType(result_file, 'Mach-O universal binary with 2 architectures'
81 '.*architecture i386.*architecture x86_64') 89 '.*architecture i386.*architecture x86_64')
OLDNEW
« test/mac/archs/test-archs-multiarch.gyp ('K') | « test/mac/archs/test-archs-multiarch.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698