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

Side by Side Diff: test/msvs/shared_output/gyptest-shared_output.py

Issue 10378042: Correct the order in which OutputDirectory and IntermediateDirectory are defined. (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/msvs/shared_output/common.gypi ('k') | test/msvs/shared_output/hello.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
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
5 # found in the LICENSE file.
6
7 """
8 Test demonstrating a difference in the expansion precidence between vcbuild
scottmg 2012/05/08 20:25:14 typo, precedence
9 and msbuild.
10 Previously $(OutDir) when used in the definition of IntermediateDirectory
11 would expand to the value of OutputDirectory in the project scrope.
scottmg 2012/05/08 20:25:14 typo, scope
12 With msbuild, $(OutDir) expands based on the inherited property value,
13 which defaults to $(SolutionDir)/$(Configuration).
14 To work with all versions of msvs, we should avoid defining
15 IntermediateDirectory in terms of $(OutDir).
16 """
17
18 import TestGyp
19 import os
20
21 test = TestGyp.TestGyp(workdir='workarea_shared_output', formats=['msvs'])
22
23 test.run_gyp('hello.gyp')
24 test.set_configuration('Baz')
25
26 test.build('there/there.gyp', test.ALL)
27 test.must_exist(os.path.join(test.workdir, 'foo', 'there.exe'))
28
29 # MSBuild expands $(OutDir) based on inherited values, so it cannot be
30 # sensibly used in the definition of IntermediateDirectory.
31 if test.uses_msbuild:
32 test.must_exist(os.path.join(test.workdir,
33 'there', 'Baz', 'bar', 'there.obj'))
34 else:
35 test.must_exist(os.path.join(test.workdir,
36 'foo', 'bar', 'there.obj'))
37
38 test.build('hello.gyp', test.ALL)
39 test.must_exist(os.path.join(test.workdir, 'foo', 'hello.exe'))
40
41 # MSBuild expands $(OutDir) based on inherited values, so it cannot be
42 # sensibly used in the definition of IntermediateDirectory.
scottmg 2012/05/08 20:25:14 probably don't need this same comment 2x
43 if test.uses_msbuild:
44 test.must_exist(os.path.join(test.workdir,
45 'Baz', 'bar', 'hello.obj'))
46 else:
47 test.must_exist(os.path.join(test.workdir,
48 'foo', 'bar', 'hello.obj'))
49
50 test.pass_test()
OLDNEW
« no previous file with comments | « test/msvs/shared_output/common.gypi ('k') | test/msvs/shared_output/hello.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698