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

Side by Side Diff: test/ninja/action_dependencies/gyptest-action-dependencies.py

Issue 8400082: Ninja: separate dependencies for compile steps vs actions/rules/copies (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: style Created 9 years, 1 month 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/ninja.py ('k') | test/ninja/action_dependencies/src/a.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2009 Google Inc. All rights reserved.
Nico 2011/11/08 04:26:57 daylight saving years (also elsewhere)
piman 2011/11/08 22:01:41 Done.
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 Verify that building an object file correctly depends on running actions in
9 dependent targets, but not the targets themselves.
10 """
11
12 import TestGyp
13
14 test = TestGyp.TestGyp(formats=['ninja'])
Nico 2011/11/08 04:26:57 Will this work with other generators? Can you remo
piman 2011/11/08 22:01:41 The test will not work with other generators becau
Nico 2011/11/09 19:47:55 Makes sense. Maybe add this as a comment.
15
16 test.run_gyp('action_dependencies.gyp', chdir='src')
17
18 chdir = 'relocate/src'
19 test.relocate('src', chdir)
20
21 test.build('action_dependencies.gyp', 'obj/b.b.o', chdir=chdir)
22
23 # The 'a' actions should be run (letting b.c compile), but the a static library
24 # should not be built.
25 test.built_file_must_not_exist('a', type=test.STATIC_LIB, chdir=chdir)
26 test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir)
27 test.built_file_must_exist('obj/b.b.o', chdir=chdir)
28
29 test.build('action_dependencies.gyp', 'obj/c.c.o', chdir=chdir)
30
31 # 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c
32 # compile
33 test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir)
34 test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir)
35 test.built_file_must_exist('obj/c.c.o', chdir=chdir)
36
37
38 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/ninja/action_dependencies/src/a.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698