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

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

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 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
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 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
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698