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

Side by Side Diff: test/ios/gyptest-app-ios.py

Issue 825453002: Convert plist and strings to binary for iOS. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: spacing Created 6 years 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
« no previous file with comments | « pylib/gyp/mac_tool.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 ios app bundles are built correctly. 8 Verifies that ios app bundles are built correctly.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 import subprocess
13 import sys 14 import sys
14 15
16 def CheckFileBinaryPropertyList(file):
17 proc = subprocess.Popen(['file', file], stdout=subprocess.PIPE)
sdefresne 2014/12/22 20:42:03 nit: you can use subprocess.check_output() instead
justincohen 2015/03/06 19:28:03 Done.
18 o = proc.communicate()[0].strip()
19 assert not proc.returncode
20 if not 'Apple binary property list' in o:
21 print 'File: Expected Apple binary property list, got %s' % o
22 test.fail_test()
23
15 if sys.platform == 'darwin': 24 if sys.platform == 'darwin':
16 test = TestGyp.TestGyp(formats=['xcode', 'ninja']) 25 test = TestGyp.TestGyp(formats=['xcode', 'ninja'])
17 26
18 test.run_gyp('test.gyp', chdir='app-bundle') 27 test.run_gyp('test.gyp', chdir='app-bundle')
19 28
20 test.build('test.gyp', test.ALL, chdir='app-bundle') 29 test.build('test.gyp', test.ALL, chdir='app-bundle')
21 30
22 # Test that the extension is .bundle 31 # Test that the extension is .bundle
23 test.built_file_must_exist('Test App Gyp.app/Test App Gyp', 32 test.built_file_must_exist('Test App Gyp.app/Test App Gyp',
24 chdir='app-bundle') 33 chdir='app-bundle')
25 34
26 # Info.plist 35 # Info.plist
27 info_plist = test.built_file_path('Test App Gyp.app/Info.plist', 36 info_plist = test.built_file_path('Test App Gyp.app/Info.plist',
28 chdir='app-bundle') 37 chdir='app-bundle')
38 test.built_file_must_exist(info_plist)
39 CheckFileBinaryPropertyList(info_plist)
40
29 # Resources 41 # Resources
30 test.built_file_must_exist( 42 strings_file = test.built_file_path(
31 'Test App Gyp.app/English.lproj/InfoPlist.strings', 43 'Test App Gyp.app/English.lproj/InfoPlist.strings',
32 chdir='app-bundle') 44 chdir='app-bundle')
45 test.built_file_must_exist(strings_file)
46 CheckFileBinaryPropertyList(strings_file)
47
33 test.built_file_must_exist( 48 test.built_file_must_exist(
34 'Test App Gyp.app/English.lproj/MainMenu.nib', 49 'Test App Gyp.app/English.lproj/MainMenu.nib',
35 chdir='app-bundle') 50 chdir='app-bundle')
36 test.built_file_must_exist( 51 test.built_file_must_exist(
37 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc', 52 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc',
38 chdir='app-bundle') 53 chdir='app-bundle')
39 54
40 # Packaging 55 # Packaging
41 test.built_file_must_exist('Test App Gyp.app/PkgInfo', 56 test.built_file_must_exist('Test App Gyp.app/PkgInfo',
42 chdir='app-bundle') 57 chdir='app-bundle')
43 test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause', 58 test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause',
44 chdir='app-bundle') 59 chdir='app-bundle')
45 60
46 test.pass_test() 61 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/mac_tool.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698