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

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

Issue 423753003: Pull in relevant targets when using xcode-ninja (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@Fix-Xcode-ninja-workspace-3
Patch Set: Rebase onto master Created 6 years, 4 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 | « test/generator-output/gyptest-actions.py ('k') | test/generator-output/gyptest-rules.py » ('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) 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 # Android doesn't support --generator-output. 14 # Android doesn't support --generator-output.
15 test = TestGyp.TestGyp(formats=['!android']) 15 test = TestGyp.TestGyp(formats=['!android'])
16 16
17 test.writable(test.workpath('copies'), False) 17 test.writable(test.workpath('copies'), False)
18 18
19 test.run_gyp('copies.gyp', 19 test.run_gyp('copies.gyp',
20 '--generator-output=' + test.workpath('gypfiles'), 20 '--generator-output=' + test.workpath('gypfiles'),
21 '-G', 'xcode_ninja_target_pattern=^(?!copies_null)',
21 chdir='copies') 22 chdir='copies')
22 23
23 test.writable(test.workpath('copies'), True) 24 test.writable(test.workpath('copies'), True)
24 25
25 test.relocate('copies', 'relocate/copies') 26 test.relocate('copies', 'relocate/copies')
26 test.relocate('gypfiles', 'relocate/gypfiles') 27 test.relocate('gypfiles', 'relocate/gypfiles')
27 28
28 test.writable(test.workpath('relocate/copies'), False) 29 test.writable(test.workpath('relocate/copies'), False)
29 30
30 test.writable(test.workpath('relocate/copies/build'), True) 31 test.writable(test.workpath('relocate/copies/build'), True)
31 test.writable(test.workpath('relocate/copies/copies-out'), True) 32 test.writable(test.workpath('relocate/copies/copies-out'), True)
32 test.writable(test.workpath('relocate/copies/subdir/build'), True) 33 test.writable(test.workpath('relocate/copies/subdir/build'), True)
33 test.writable(test.workpath('relocate/copies/subdir/copies-out'), True) 34 test.writable(test.workpath('relocate/copies/subdir/copies-out'), True)
34 35
35 test.build('copies.gyp', test.ALL, chdir='relocate/gypfiles') 36 test.build('copies.gyp', test.ALL, chdir='relocate/gypfiles')
36 37
37 test.must_match(['relocate', 'copies', 'copies-out', 'file1'], 38 test.must_match(['relocate', 'copies', 'copies-out', 'file1'],
38 "file1 contents\n") 39 "file1 contents\n")
39 40
40 if test.format == 'xcode': 41 if test.format == 'xcode':
41 chdir = 'relocate/copies/build' 42 chdir = 'relocate/copies/build'
42 elif test.format in ['make', 'ninja', 'cmake']: 43 elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
43 chdir = 'relocate/gypfiles/out' 44 chdir = 'relocate/gypfiles/out'
44 else: 45 else:
45 chdir = 'relocate/gypfiles' 46 chdir = 'relocate/gypfiles'
46 test.must_match([chdir, 'Default', 'copies-out', 'file2'], "file2 contents\n") 47 test.must_match([chdir, 'Default', 'copies-out', 'file2'], "file2 contents\n")
47 48
48 test.must_match(['relocate', 'copies', 'subdir', 'copies-out', 'file3'], 49 test.must_match(['relocate', 'copies', 'subdir', 'copies-out', 'file3'],
49 "file3 contents\n") 50 "file3 contents\n")
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 in ['make', 'ninja', 'cmake']: 54 elif test.format in ['make', 'ninja', 'xcode-ninja', 'cmake']:
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
« no previous file with comments | « test/generator-output/gyptest-actions.py ('k') | test/generator-output/gyptest-rules.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698