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

Unified Diff: test/ios/gyptest-per-config-settings.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 side-by-side diff with in-line comments
Download patch
Index: test/ios/gyptest-per-config-settings.py
diff --git a/test/ios/gyptest-per-config-settings.py b/test/ios/gyptest-per-config-settings.py
index 7313e563439bbb98c7252389185c63f4c1f566b1..7de06486cc4e200d58c603e8f5153cd23f55ac72 100644
--- a/test/ios/gyptest-per-config-settings.py
+++ b/test/ios/gyptest-per-config-settings.py
@@ -8,6 +8,8 @@
Verifies that device and simulator bundles are built correctly.
"""
+from __future__ import print_function
+
import plistlib
import TestGyp
import os
@@ -22,7 +24,7 @@ def CheckFileType(file, expected):
o = proc.communicate()[0].strip()
assert not proc.returncode
if not expected in o:
- print 'File: Expected %s, got %s' % (expected, o)
+ print('File: Expected %s, got %s' % (expected, o))
test.fail_test()
def HasCerts():
@@ -37,7 +39,7 @@ def CheckSignature(file):
o = proc.communicate()[0].strip()
assert not proc.returncode
if "code object is not signed at all" in o:
- print 'File %s not properly signed.' % (file)
+ print('File %s not properly signed.' % (file))
test.fail_test()
def CheckEntitlements(file, expected_entitlements):
@@ -49,10 +51,10 @@ def CheckEntitlements(file, expected_entitlements):
data = temp.read()
entitlements = ParseEntitlements(data)
if not entitlements:
- print 'No valid entitlements found in %s.' % (file)
+ print('No valid entitlements found in %s.' % (file))
test.fail_test()
if entitlements != expected_entitlements:
- print 'Unexpected entitlements found in %s.' % (file)
+ print('Unexpected entitlements found in %s.' % (file))
test.fail_test()
def ParseEntitlements(data):
@@ -75,17 +77,17 @@ def GetMachineBuild():
def CheckPlistvalue(plist, key, expected):
if key not in plist:
- print '%s not set in plist' % key
+ print('%s not set in plist' % key)
test.fail_test()
return
actual = plist[key]
if actual != expected:
- print 'File: Expected %s, got %s for %s' % (expected, actual, key)
+ print('File: Expected %s, got %s for %s' % (expected, actual, key))
test.fail_test()
def CheckPlistNotSet(plist, key):
if key in plist:
- print '%s should not be set in plist' % key
+ print('%s should not be set in plist' % key)
test.fail_test()
return
@@ -111,7 +113,7 @@ if sys.platform == 'darwin':
xcode_version = TestMac.Xcode.Version()
if xcode_version >= '0720':
if len(plist) != 23:
- print 'plist should have 23 entries, but it has %s' % len(plist)
+ print('plist should have 23 entries, but it has %s' % len(plist))
test.fail_test()
# Values that will hopefully never change.

Powered by Google App Engine
This is Rietveld 408576698