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

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

Issue 11659002: Teach ninja to handle output directories outside the source dir. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 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 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 file copies with --generator-output using an explicit build 8 Verifies file copies with --generator-output using an explicit build
9 target of 'all'. 9 target of 'all'.
10 """ 10 """
11 11
12 import TestGyp 12 import TestGyp
13 13
14 # Ninja and Android don't support --generator-output. 14 # Android doesn't support --generator-output.
15 # Ninja doesn't support relocation.
15 test = TestGyp.TestGyp(formats=['!ninja', '!android']) 16 test = TestGyp.TestGyp(formats=['!ninja', '!android'])
16 17
17 test.writable(test.workpath('copies'), False) 18 test.writable(test.workpath('copies'), False)
18 19
19 test.run_gyp('copies.gyp', 20 test.run_gyp('copies.gyp',
20 '--generator-output=' + test.workpath('gypfiles'), 21 '--generator-output=' + test.workpath('gypfiles'),
21 chdir='copies') 22 chdir='copies')
22 23
23 test.writable(test.workpath('copies'), True) 24 test.writable(test.workpath('copies'), True)
24 25
(...skipping 25 matching lines...) Expand all
50 51
51 if test.format == 'xcode': 52 if test.format == 'xcode':
52 chdir = 'relocate/copies/subdir/build' 53 chdir = 'relocate/copies/subdir/build'
53 elif test.format == 'make': 54 elif test.format == 'make':
54 chdir = 'relocate/gypfiles/out' 55 chdir = 'relocate/gypfiles/out'
55 else: 56 else:
56 chdir = 'relocate/gypfiles' 57 chdir = 'relocate/gypfiles'
57 test.must_match([chdir, 'Default', 'copies-out', 'file4'], "file4 contents\n") 58 test.must_match([chdir, 'Default', 'copies-out', 'file4'], "file4 contents\n")
58 59
59 test.pass_test() 60 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698