OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2011 Google Inc. All rights reserved. |
| 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']) |
| 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 |