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

Side by Side Diff: test/defines/gyptest-defines-env-regyp.py

Issue 10408026: Try to fix defines containing '#' characters with cl.exe. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « test/defines/gyptest-defines.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2011 Google Inc. All rights reserved. 3 # Copyright (c) 2011 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 build of an executable with C++ define specified by a gyp define, and 8 Verifies build of an executable with C++ define specified by a gyp define, and
9 the use of the environment during regeneration when the gyp file changes. 9 the use of the environment during regeneration when the gyp file changes.
10 """ 10 """
(...skipping 14 matching lines...) Expand all
25 # case the platform doesn't support unsetenv. 25 # case the platform doesn't support unsetenv.
26 os.environ['GYP_DEFINES'] = '' 26 os.environ['GYP_DEFINES'] = ''
27 del os.environ['GYP_DEFINES'] 27 del os.environ['GYP_DEFINES']
28 28
29 test.build('defines.gyp') 29 test.build('defines.gyp')
30 30
31 expect = """\ 31 expect = """\
32 FOO is defined 32 FOO is defined
33 VALUE is 1 33 VALUE is 1
34 2*PAREN_VALUE is 12 34 2*PAREN_VALUE is 12
35 HASH_VALUE is a#b 35 HASH_VALUE is a#1
36 """ 36 """
37 test.run_built_executable('defines', stdout=expect) 37 test.run_built_executable('defines', stdout=expect)
38 38
39 # Sleep so that the changed gyp file will have a newer timestamp than the 39 # Sleep so that the changed gyp file will have a newer timestamp than the
40 # previously generated build files. 40 # previously generated build files.
41 test.sleep() 41 test.sleep()
42 test.write('defines.gyp', test.read('defines-env.gyp')) 42 test.write('defines.gyp', test.read('defines-env.gyp'))
43 43
44 test.build('defines.gyp', test.ALL) 44 test.build('defines.gyp', test.ALL)
45 45
46 expect = """\ 46 expect = """\
47 VALUE is 50 47 VALUE is 50
48 """ 48 """
49 test.run_built_executable('defines', stdout=expect) 49 test.run_built_executable('defines', stdout=expect)
50 50
51 test.pass_test() 51 test.pass_test()
OLDNEW
« no previous file with comments | « test/defines/gyptest-defines.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698