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

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: Remove blank line Created 5 years, 9 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
« no previous file with comments | « test/ios/app-bundle/test.gyp ('k') | test/mac/gyptest-app.py » ('j') | 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 CheckFileXMLPropertyList(file):
17 output = subprocess.check_output(['file', file])
18 # The double space after XML is intentional.
19 if not 'XML document text' in output:
20 print 'File: Expected XML document text, got %s' % output
21 test.fail_test()
22
23 def CheckFileBinaryPropertyList(file):
24 output = subprocess.check_output(['file', file])
25 if not 'Apple binary property list' in output:
26 print 'File: Expected Apple binary property list, got %s' % output
27 test.fail_test()
28
15 if sys.platform == 'darwin': 29 if sys.platform == 'darwin':
16 test = TestGyp.TestGyp(formats=['xcode', 'ninja']) 30 test = TestGyp.TestGyp(formats=['xcode', 'ninja'])
17 31
18 test.run_gyp('test.gyp', chdir='app-bundle') 32 test.run_gyp('test.gyp', chdir='app-bundle')
19 33
20 test.build('test.gyp', test.ALL, chdir='app-bundle') 34 test.build('test.gyp', test.ALL, chdir='app-bundle')
21 35
22 # Test that the extension is .bundle 36 # Test that the extension is .bundle
23 test.built_file_must_exist('Test App Gyp.app/Test App Gyp', 37 test.built_file_must_exist('Test App Gyp.app/Test App Gyp',
24 chdir='app-bundle') 38 chdir='app-bundle')
25 39
26 # Info.plist 40 # Info.plist
27 info_plist = test.built_file_path('Test App Gyp.app/Info.plist', 41 info_plist = test.built_file_path('Test App Gyp.app/Info.plist',
28 chdir='app-bundle') 42 chdir='app-bundle')
43 test.built_file_must_exist(info_plist)
44 CheckFileBinaryPropertyList(info_plist)
45
46 # XML Info.plist
47 info_plist = test.built_file_path('Test App Gyp XML.app/Info.plist',
48 chdir='app-bundle')
49 CheckFileXMLPropertyList(info_plist)
50
29 # Resources 51 # Resources
30 test.built_file_must_exist( 52 strings_file = test.built_file_path(
31 'Test App Gyp.app/English.lproj/InfoPlist.strings', 53 'Test App Gyp.app/English.lproj/InfoPlist.strings',
32 chdir='app-bundle') 54 chdir='app-bundle')
55 test.built_file_must_exist(strings_file)
56 CheckFileBinaryPropertyList(strings_file)
57
33 test.built_file_must_exist( 58 test.built_file_must_exist(
34 'Test App Gyp.app/English.lproj/MainMenu.nib', 59 'Test App Gyp.app/English.lproj/MainMenu.nib',
35 chdir='app-bundle') 60 chdir='app-bundle')
36 test.built_file_must_exist( 61 test.built_file_must_exist(
37 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc', 62 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc',
38 chdir='app-bundle') 63 chdir='app-bundle')
39 64
40 # Packaging 65 # Packaging
41 test.built_file_must_exist('Test App Gyp.app/PkgInfo', 66 test.built_file_must_exist('Test App Gyp.app/PkgInfo',
42 chdir='app-bundle') 67 chdir='app-bundle')
43 test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause', 68 test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause',
44 chdir='app-bundle') 69 chdir='app-bundle')
45 70
46 test.pass_test() 71 test.pass_test()
OLDNEW
« no previous file with comments | « test/ios/app-bundle/test.gyp ('k') | test/mac/gyptest-app.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698