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

Side by Side Diff: test/mac/gyptest-app-error.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 invalid strings files cause the build to fail. 8 Verifies that invalid strings files cause the build to fail.
9 """ 9 """
10 10
11 from __future__ import print_function
12
11 import TestCmd 13 import TestCmd
12 import TestGyp 14 import TestGyp
13 15
14 import sys 16 import sys
15 17
16 if sys.platform == 'darwin': 18 if sys.platform == 'darwin':
17 print "This test is currently disabled: https://crbug.com/483696." 19 print("This test is currently disabled: https://crbug.com/483696.")
18 sys.exit(0) 20 sys.exit(0)
19 21
20 expected_error = 'Old-style plist parser: missing semicolon in dictionary' 22 expected_error = 'Old-style plist parser: missing semicolon in dictionary'
21 saw_expected_error = [False] # Python2 has no "nonlocal" keyword. 23 saw_expected_error = [False] # Python2 has no "nonlocal" keyword.
22 def match(a, b): 24 def match(a, b):
23 if a == b: 25 if a == b:
24 return True 26 return True
25 if not TestCmd.is_List(a): 27 if not TestCmd.is_List(a):
26 a = a.split('\n') 28 a = a.split('\n')
27 if not TestCmd.is_List(b): 29 if not TestCmd.is_List(b):
(...skipping 10 matching lines...) Expand all
38 40
39 # Ninja pipes stderr of subprocesses to stdout. 41 # Ninja pipes stderr of subprocesses to stdout.
40 if test.format in ['ninja', 'xcode-ninja'] \ 42 if test.format in ['ninja', 'xcode-ninja'] \
41 and expected_error in test.stdout(): 43 and expected_error in test.stdout():
42 saw_expected_error[0] = True 44 saw_expected_error[0] = True
43 45
44 if saw_expected_error[0]: 46 if saw_expected_error[0]:
45 test.pass_test() 47 test.pass_test()
46 else: 48 else:
47 test.fail_test() 49 test.fail_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698