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

Side by Side Diff: test/additional-targets/gyptest-additional.py

Issue 421453003: Add TestGypXcodeNinja to run tests against the xcode-ninja generator (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase onto origin/master Created 6 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
« no previous file with comments | « test/actions/gyptest-default.py ('k') | test/build-option/gyptest-build.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 simple actions when using an explicit build target of 'all'. 8 Verifies simple actions when using an explicit build target of 'all'.
9 """ 9 """
10 10
11 import TestGyp 11 import TestGyp
12 12
13 test = TestGyp.TestGyp() 13 test = TestGyp.TestGyp()
14 14
15 test.run_gyp('all.gyp', chdir='src') 15 test.run_gyp('all.gyp',
16 '-G', 'xcode_ninja_target_pattern=^all_targets$',
17 chdir='src')
18
16 test.relocate('src', 'relocate/src') 19 test.relocate('src', 'relocate/src')
17 20
18 # Build all. 21 # Build all.
19 test.build('all.gyp', chdir='relocate/src') 22 test.build('all.gyp', chdir='relocate/src')
20 23
21 if test.format=='xcode': 24 if test.format=='xcode':
22 chdir = 'relocate/src/dir1' 25 chdir = 'relocate/src/dir1'
23 else: 26 else:
24 chdir = 'relocate/src' 27 chdir = 'relocate/src'
25 28
26 # Output is as expected. 29 # Output is as expected.
27 file_content = 'Hello from emit.py\n' 30 file_content = 'Hello from emit.py\n'
28 test.built_file_must_match('out2.txt', file_content, chdir=chdir) 31 test.built_file_must_match('out2.txt', file_content, chdir=chdir)
29 32
30 test.built_file_must_not_exist('out.txt', chdir='relocate/src') 33 test.built_file_must_not_exist('out.txt', chdir='relocate/src')
31 test.built_file_must_not_exist('foolib1', 34 test.built_file_must_not_exist('foolib1',
32 type=test.SHARED_LIB, 35 type=test.SHARED_LIB,
33 chdir=chdir) 36 chdir=chdir)
34 37
38 # xcode-ninja doesn't generate separate workspaces for sub-gyps by design
39 if test.format == 'xcode-ninja':
40 test.pass_test()
41
35 # TODO(mmoss) Make consistent with msvs, with 'dir1' before 'out/Default'? 42 # TODO(mmoss) Make consistent with msvs, with 'dir1' before 'out/Default'?
36 if test.format in ('make', 'ninja', 'android', 'cmake'): 43 if test.format in ('make', 'ninja', 'android', 'cmake'):
37 chdir='relocate/src' 44 chdir='relocate/src'
38 else: 45 else:
39 chdir='relocate/src/dir1' 46 chdir='relocate/src/dir1'
40 47
41 # Build the action explicitly. 48 # Build the action explicitly.
42 test.build('actions.gyp', 'action1_target', chdir=chdir) 49 test.build('actions.gyp', 'action1_target', chdir=chdir)
43 50
44 # Check that things got run. 51 # Check that things got run.
45 file_content = 'Hello from emit.py\n' 52 file_content = 'Hello from emit.py\n'
46 test.built_file_must_exist('out.txt', chdir=chdir) 53 test.built_file_must_exist('out.txt', chdir=chdir)
47 54
48 # Build the shared library explicitly. 55 # Build the shared library explicitly.
49 test.build('actions.gyp', 'foolib1', chdir=chdir) 56 test.build('actions.gyp', 'foolib1', chdir=chdir)
50 57
51 test.built_file_must_exist('foolib1', 58 test.built_file_must_exist('foolib1',
52 type=test.SHARED_LIB, 59 type=test.SHARED_LIB,
53 chdir=chdir, 60 chdir=chdir,
54 subdir='dir1') 61 subdir='dir1')
55 62
56 test.pass_test() 63 test.pass_test()
OLDNEW
« no previous file with comments | « test/actions/gyptest-default.py ('k') | test/build-option/gyptest-build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698