OLD | NEW |
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 from __future__ import print_function |
| 12 |
11 import TestGyp | 13 import TestGyp |
12 | 14 |
13 import subprocess | 15 import subprocess |
14 import sys | 16 import sys |
15 | 17 |
16 def CheckFileXMLPropertyList(file): | 18 def CheckFileXMLPropertyList(file): |
17 output = subprocess.check_output(['file', file]) | 19 output = subprocess.check_output(['file', file]) |
18 # The double space after XML is intentional. | 20 # The double space after XML is intentional. |
19 if not 'XML document text' in output: | 21 if not 'XML document text' in output: |
20 print 'File: Expected XML document text, got %s' % output | 22 print('File: Expected XML document text, got %s' % output) |
21 test.fail_test() | 23 test.fail_test() |
22 | 24 |
23 def CheckFileBinaryPropertyList(file): | 25 def CheckFileBinaryPropertyList(file): |
24 output = subprocess.check_output(['file', file]) | 26 output = subprocess.check_output(['file', file]) |
25 if not 'Apple binary property list' in output: | 27 if not 'Apple binary property list' in output: |
26 print 'File: Expected Apple binary property list, got %s' % output | 28 print('File: Expected Apple binary property list, got %s' % output) |
27 test.fail_test() | 29 test.fail_test() |
28 | 30 |
29 if sys.platform == 'darwin': | 31 if sys.platform == 'darwin': |
30 test = TestGyp.TestGyp(formats=['xcode', 'ninja']) | 32 test = TestGyp.TestGyp(formats=['xcode', 'ninja']) |
31 | 33 |
32 test.run_gyp('test.gyp', chdir='app-bundle') | 34 test.run_gyp('test.gyp', chdir='app-bundle') |
33 | 35 |
34 test.build('test.gyp', test.ALL, chdir='app-bundle') | 36 test.build('test.gyp', test.ALL, chdir='app-bundle') |
35 | 37 |
36 # Test that the extension is .bundle | 38 # Test that the extension is .bundle |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc', | 70 'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc', |
69 chdir='app-bundle') | 71 chdir='app-bundle') |
70 | 72 |
71 # Packaging | 73 # Packaging |
72 test.built_file_must_exist('Test App Gyp.app/PkgInfo', | 74 test.built_file_must_exist('Test App Gyp.app/PkgInfo', |
73 chdir='app-bundle') | 75 chdir='app-bundle') |
74 test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause', | 76 test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause', |
75 chdir='app-bundle') | 77 chdir='app-bundle') |
76 | 78 |
77 test.pass_test() | 79 test.pass_test() |
OLD | NEW |