OLD | NEW |
---|---|
(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() | |
OLD | NEW |