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

Side by Side Diff: test/ninja/action_dependencies/gyptest-action-dependencies.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
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 Verify that building an object file correctly depends on running actions in 8 Verify that building an object file correctly depends on running actions in
9 dependent targets, but not the targets themselves. 9 dependent targets, but not the targets themselves.
10 """ 10 """
11 11
12 import os 12 import os
13 import sys 13 import sys
14 import TestGyp 14 import TestGyp
15 15
16 # NOTE(piman): This test will not work with other generators because: 16 # NOTE(piman): This test will not work with other generators because:
17 # - it explicitly tests the optimization, which is not implemented (yet?) on 17 # - it explicitly tests the optimization, which is not implemented (yet?) on
18 # other generators 18 # other generators
19 # - it relies on the exact path to output object files, which is generator 19 # - it relies on the exact path to output object files, which is generator
20 # dependent, and actually, relies on the ability to build only that object file, 20 # dependent, and actually, relies on the ability to build only that object file,
21 # which I don't think is available on all generators. 21 # which I don't think is available on all generators.
22 # TODO(piman): Extend to other generators when possible. 22 # TODO(piman): Extend to other generators when possible.
23 test = TestGyp.TestGyp(formats=['ninja']) 23 test = TestGyp.TestGyp(formats=['ninja'])
24 # xcode-ninja doesn't support building single object files by design.
25 if test.format == 'xcode-ninja':
26 test.skip_test()
24 27
25 test.run_gyp('action_dependencies.gyp', chdir='src') 28 test.run_gyp('action_dependencies.gyp', chdir='src')
26 29
27 chdir = 'relocate/src' 30 chdir = 'relocate/src'
28 test.relocate('src', chdir) 31 test.relocate('src', chdir)
29 32
30 objext = '.obj' if sys.platform == 'win32' else '.o' 33 objext = '.obj' if sys.platform == 'win32' else '.o'
31 34
32 test.build('action_dependencies.gyp', 35 test.build('action_dependencies.gyp',
33 os.path.join('obj', 'b.b' + objext), 36 os.path.join('obj', 'b.b' + objext),
(...skipping 10 matching lines...) Expand all
44 chdir=chdir) 47 chdir=chdir)
45 48
46 # 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c 49 # 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c
47 # compile 50 # compile
48 test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir) 51 test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir)
49 test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir) 52 test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir)
50 test.built_file_must_exist(os.path.join('obj', 'c.c' + objext), chdir=chdir) 53 test.built_file_must_exist(os.path.join('obj', 'c.c' + objext), chdir=chdir)
51 54
52 55
53 test.pass_test() 56 test.pass_test()
OLDNEW
« no previous file with comments | « test/ninja/action-rule-hash/gyptest-action-rule-hash.py ('k') | test/ninja/chained-dependency/gyptest-chained-dependency.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698