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

Side by Side Diff: test/rules-dirname/gyptest-dirname.py

Issue 294183004: Use relative path/dir msbuild variables to map $(InputDir) and $(InputPath) (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Fix for Mac trybot Created 6 years, 6 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
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/rules-dirname/src/subdir/input-rule-dirname.gyp » ('j') | 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 simple rules when using an explicit build target of 'all'. 8 Verifies simple rules when using an explicit build target of 'all'.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 import os 12 import os
13 import sys
13 14
14 test = TestGyp.TestGyp(formats=['make', 'ninja', 'android', 'xcode']) 15 test = TestGyp.TestGyp(formats=['make', 'ninja', 'android', 'xcode', 'msvs'])
15 16
16 test.run_gyp('actions.gyp', chdir='src') 17 test.run_gyp('actions.gyp', chdir='src')
17 18
18 test.relocate('src', 'relocate/src') 19 test.relocate('src', 'relocate/src')
19 20
20 test.build('actions.gyp', chdir='relocate/src') 21 test.build('actions.gyp', chdir='relocate/src')
21 22
22 expect = """\ 23 expect = """\
23 no dir here 24 no dir here
24 hi c 25 hi c
25 hello baz 26 hello baz
26 """ 27 """
27 if test.format == 'xcode': 28 if test.format == 'xcode':
28 chdir = 'relocate/src/subdir' 29 chdir = 'relocate/src/subdir'
29 else: 30 else:
30 chdir = 'relocate/src' 31 chdir = 'relocate/src'
31 test.run_built_executable('gencc_int_output', chdir=chdir, stdout=expect) 32 test.run_built_executable('gencc_int_output', chdir=chdir, stdout=expect)
33 if test.format == 'msvs':
34 test.run_built_executable('gencc_int_output_external', chdir=chdir,
35 stdout=expect)
32 36
33 test.must_match('relocate/src/subdir/foo/bar/baz.printed', 37 test.must_match('relocate/src/subdir/foo/bar/baz.dirname',
34 os.path.join('foo', 'bar')) 38 os.path.join('foo', 'bar'))
35 test.must_match('relocate/src/subdir/a/b/c.printed', os.path.join('a', 'b')) 39 test.must_match('relocate/src/subdir/a/b/c.dirname',
40 os.path.join('a', 'b'))
41
42 # FIXME the xcode and make generators incorrectly convert RULE_INPUT_PATH
43 # to an absolute path, making the tests below fail!
44 if test.format != 'xcode' and test.format != 'make':
45 test.must_match('relocate/src/subdir/foo/bar/baz.path',
46 os.path.join('foo', 'bar', 'baz.printvars'))
47 test.must_match('relocate/src/subdir/a/b/c.path',
48 os.path.join('a', 'b', 'c.printvars'))
36 49
37 test.pass_test() 50 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | test/rules-dirname/src/subdir/input-rule-dirname.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698