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

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

Issue 10413004: Try to fix failing tests after 1386. (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/defines.c ('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 """ 36 """
36 test.run_built_executable('defines', stdout=expect) 37 test.run_built_executable('defines', stdout=expect)
37 38
38 # 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
39 # previously generated build files. 40 # previously generated build files.
40 test.sleep() 41 test.sleep()
41 test.write('defines.gyp', test.read('defines-env.gyp')) 42 test.write('defines.gyp', test.read('defines-env.gyp'))
42 43
43 test.build('defines.gyp', test.ALL) 44 test.build('defines.gyp', test.ALL)
44 45
45 expect = """\ 46 expect = """\
46 VALUE is 50 47 VALUE is 50
47 """ 48 """
48 test.run_built_executable('defines', stdout=expect) 49 test.run_built_executable('defines', stdout=expect)
49 50
50 test.pass_test() 51 test.pass_test()
OLDNEW
« no previous file with comments | « test/defines/defines.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698