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

Side by Side Diff: test/standalone/gyptest-standalone.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 a project hierarchy created with the --generator-output= 8 Verifies that a project hierarchy created with the --generator-output=
9 option can be built even when it's relocated to a different path. 9 option can be built even when it's relocated to a different path.
10 """ 10 """
11 11
12 from __future__ import print_function
13
12 import TestGyp 14 import TestGyp
13 import os 15 import os
14 16
15 test = TestGyp.TestGyp() 17 test = TestGyp.TestGyp()
16 18
17 test.run_gyp('standalone.gyp', '-Gstandalone') 19 test.run_gyp('standalone.gyp', '-Gstandalone')
18 20
19 # Look at all the files in the tree to make sure none 21 # Look at all the files in the tree to make sure none
20 # of them reference the gyp file. 22 # of them reference the gyp file.
21 for root, dirs, files in os.walk("."): 23 for root, dirs, files in os.walk("."):
22 for file in files: 24 for file in files:
23 # ignore ourself 25 # ignore ourself
24 if os.path.splitext(__file__)[0] in file: 26 if os.path.splitext(__file__)[0] in file:
25 continue 27 continue
26 file = os.path.join(root, file) 28 file = os.path.join(root, file)
27 contents = open(file).read() 29 contents = open(file).read()
28 if 'standalone.gyp' in contents: 30 if 'standalone.gyp' in contents:
29 print 'gyp file referenced in generated output: %s' % file 31 print('gyp file referenced in generated output: %s' % file)
30 test.fail_test() 32 test.fail_test()
31 33
32 34
33 test.pass_test() 35 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698