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

Side by Side Diff: test/variables/commands/gyptest-commands-ignore-env.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 Test that environment variables are ignored when --ignore-environment is 8 Test that environment variables are ignored when --ignore-environment is
9 specified. 9 specified.
10 """ 10 """
11 11
12 from __future__ import print_function
12 import os 13 import os
13 14
14 import TestGyp 15 import TestGyp
15 16
16 test = TestGyp.TestGyp(format='gypd') 17 test = TestGyp.TestGyp(format='gypd')
17 18
18 os.environ['GYP_DEFINES'] = 'FOO=BAR' 19 os.environ['GYP_DEFINES'] = 'FOO=BAR'
19 os.environ['GYP_GENERATORS'] = 'foo' 20 os.environ['GYP_GENERATORS'] = 'foo'
20 os.environ['GYP_GENERATOR_FLAGS'] = 'genflag=foo' 21 os.environ['GYP_GENERATOR_FLAGS'] = 'genflag=foo'
21 os.environ['GYP_GENERATOR_OUTPUT'] = 'somedir' 22 os.environ['GYP_GENERATOR_OUTPUT'] = 'somedir'
(...skipping 10 matching lines...) Expand all
32 # Normally, we should canonicalize line endings in the expected 33 # Normally, we should canonicalize line endings in the expected
33 # contents file setting the Subversion svn:eol-style to native, 34 # contents file setting the Subversion svn:eol-style to native,
34 # but that would still fail if multiple systems are sharing a single 35 # but that would still fail if multiple systems are sharing a single
35 # workspace on a network-mounted file system. Consequently, we 36 # workspace on a network-mounted file system. Consequently, we
36 # massage the Windows line endings ('\r\n') in the output to the 37 # massage the Windows line endings ('\r\n') in the output to the
37 # checked-in UNIX endings ('\n'). 38 # checked-in UNIX endings ('\n').
38 39
39 contents = test.read('commands.gypd').replace('\r', '') 40 contents = test.read('commands.gypd').replace('\r', '')
40 expect = test.read('commands.gypd.golden').replace('\r', '') 41 expect = test.read('commands.gypd.golden').replace('\r', '')
41 if not test.match(contents, expect): 42 if not test.match(contents, expect):
42 print "Unexpected contents of `commands.gypd'" 43 print("Unexpected contents of `commands.gypd'")
43 test.diff(expect, contents, 'commands.gypd ') 44 test.diff(expect, contents, 'commands.gypd ')
44 test.fail_test() 45 test.fail_test()
45 46
46 test.pass_test() 47 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698