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

Side by Side Diff: test/generator-output/gyptest-depth.py

Issue 127893002: generator output should be relative to depth. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « pylib/gyp/generator/make.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')
Property Changes:
Added: svn:eol-style
+ LF
Added: svn:executable
+ *
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright 2014 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 Verifies building a project hierarchy created when the --generator-output=
9 and --depth= options is used to put the build configuration files in a separate
10 directory tree.
11 """
12
13 import TestGyp
14 import os
15
16 # This is a regression test for the make generator only.
17 test = TestGyp.TestGyp(formats=['make'])
18
19 test.writable(test.workpath('src'), False)
20
21 toplevel_dir = os.path.basename(test.workpath())
22
23 test.run_gyp(os.path.join(toplevel_dir, 'src', 'prog1.gyp'),
24 '-Dset_symroot=1',
25 '--generator-output=gypfiles',
26 depth=toplevel_dir,
27 chdir='..')
28
29 test.writable(test.workpath('src/build'), True)
30 test.writable(test.workpath('src/subdir2/build'), True)
31 test.writable(test.workpath('src/subdir3/build'), True)
32
33 test.build('prog1.gyp', test.ALL, chdir='gypfiles')
34
35 chdir = 'gypfiles'
36
37 expect = """\
38 Hello from %s
39 Hello from inc.h
40 Hello from inc1/include1.h
41 Hello from inc2/include2.h
42 Hello from inc3/include3.h
43 Hello from subdir2/deeper/deeper.h
44 """
45
46 if test.format == 'xcode':
47 chdir = 'src'
48 test.run_built_executable('prog1', chdir=chdir, stdout=expect % 'prog1.c')
49
50 if test.format == 'xcode':
51 chdir = 'src/subdir2'
52 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c')
53
54 if test.format == 'xcode':
55 chdir = 'src/subdir3'
56 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c')
57
58 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/make.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698