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

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

Issue 23461010: ninja/mac: Don't write .TOC files into framework bundles. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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 | « pylib/gyp/generator/ninja.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 app bundles are built correctly. 8 Verifies that app bundles are built correctly.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 import os
13 import sys 14 import sys
14 15
16
17 def ls(path):
18 '''Returns a list of all files in a directory, relative to the directory.'''
19 result = []
20 for dirpath, _, files in os.walk(path):
21 for f in files:
22 result.append(os.path.join(dirpath, f)[len(path) + 1:])
23 return result
24
25
15 if sys.platform == 'darwin': 26 if sys.platform == 'darwin':
16 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode']) 27 test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
17 28
18 test.run_gyp('framework.gyp', chdir='framework') 29 test.run_gyp('framework.gyp', chdir='framework')
19 30
20 test.build('framework.gyp', 'test_framework', chdir='framework') 31 test.build('framework.gyp', 'test_framework', chdir='framework')
21 32
22 # Binary 33 # Binary
23 test.built_file_must_exist( 34 test.built_file_must_exist(
24 'Test Framework.framework/Versions/A/Test Framework', 35 'Test Framework.framework/Versions/A/Test Framework',
(...skipping 15 matching lines...) Expand all
40 chdir='framework') 51 chdir='framework')
41 test.built_file_must_exist('Test Framework.framework/Resources', 52 test.built_file_must_exist('Test Framework.framework/Resources',
42 chdir='framework') 53 chdir='framework')
43 test.built_file_must_exist('Test Framework.framework/Test Framework', 54 test.built_file_must_exist('Test Framework.framework/Test Framework',
44 chdir='framework') 55 chdir='framework')
45 # PkgInfo. 56 # PkgInfo.
46 test.built_file_must_not_exist( 57 test.built_file_must_not_exist(
47 'Test Framework.framework/Versions/A/Resources/PkgInfo', 58 'Test Framework.framework/Versions/A/Resources/PkgInfo',
48 chdir='framework') 59 chdir='framework')
49 60
61 # Check that no other files get added to the bundle.
62 print set(ls(test.built_file_path('Test Framework.framework',
63 chdir='framework')))
64 if set(ls(test.built_file_path('Test Framework.framework',
65 chdir='framework'))) != \
66 set(['Versions/A/Test Framework',
67 'Versions/A/Resources/Info.plist',
68 'Versions/A/Resources/English.lproj/InfoPlist.strings',
69 'Test Framework',
Mark Mentovai 2013/08/27 21:40:45 There are no symlinks in here?
Nico 2013/08/27 21:42:35 "Test Framework" is a symlink to the binary (point
Mark Mentovai 2013/08/27 21:44:35 Hmph. I was expecting to see Versions/Current and
Nico 2013/08/27 21:45:56 The existence of the symlinks is checked explicitl
70 'Versions/A/Libraries/empty.c', # Written by a gyp action.
71 ]):
72 test.fail_test()
73
50 test.pass_test() 74 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698