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

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) 2011 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 def CheckFileType(file, expected):
18 proc = subprocess.Popen(['file', '-b', file], stdout=subprocess.PIPE)
19 o = proc.communicate()[0].strip()
20 assert not proc.returncode
21 if o != expected:
22 print 'File: Expected %s, got %s' % (expected, o)
23 test.fail_test()
Nico 2012/02/14 06:25:46 Is test in scope here?
ukai 2012/02/14 06:38:39 move L25 before def CheckFileType
24
25 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
26
Nico 2012/02/14 06:25:46 Nit: 2 space indent
ukai 2012/02/14 06:38:39 Done.
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