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

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

Issue 9382044: mac: Support ARCHS with zero or one element in the make and ninja generators. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 8 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
« no previous file with comments | « test/mac/archs/test-no-archs.gyp ('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
(Empty)
1 #!/usr/bin/env python
2
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
5 # found in the LICENSE file.
6
7 """
8 Tests things related to ARCHS.
9 """
10
11 import TestGyp
12
13 import subprocess
14 import sys
15
16 if sys.platform == 'darwin':
17 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
18
19 def CheckFileType(file, expected):
20 proc = subprocess.Popen(['file', '-b', file], stdout=subprocess.PIPE)
21 o = proc.communicate()[0].strip()
22 assert not proc.returncode
23 if o != expected:
24 print 'File: Expected %s, got %s' % (expected, o)
25 test.fail_test()
26
27 test.run_gyp('test-no-archs.gyp', chdir='archs')
28 test.build('test-no-archs.gyp', test.ALL, chdir='archs')
29 result_file = test.built_file_path('Test', chdir='archs')
30 test.must_exist(result_file)
31 CheckFileType(result_file, 'Mach-O executable i386')
32
33 test.run_gyp('test-archs-x86_64.gyp', chdir='archs')
34 test.build('test-archs-x86_64.gyp', test.ALL, chdir='archs')
35 result_file = test.built_file_path('Test64', chdir='archs')
36 test.must_exist(result_file)
37 CheckFileType(result_file, 'Mach-O 64-bit executable x86_64')
OLDNEW
« no previous file with comments | « test/mac/archs/test-no-archs.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698