Chromium Code Reviews| Index: test/ninja/action_dependencies/gyptest-action-dependencies.py |
| diff --git a/test/ninja/action_dependencies/gyptest-action-dependencies.py b/test/ninja/action_dependencies/gyptest-action-dependencies.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0d8bc3dcf963b9ca73601ff875a9481f90a3c8fc |
| --- /dev/null |
| +++ b/test/ninja/action_dependencies/gyptest-action-dependencies.py |
| @@ -0,0 +1,38 @@ |
| +#!/usr/bin/env python |
| + |
| +# 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.
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +""" |
| +Verify that building an object file correctly depends on running actions in |
| +dependent targets, but not the targets themselves. |
| +""" |
| + |
| +import TestGyp |
| + |
| +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.
|
| + |
| +test.run_gyp('action_dependencies.gyp', chdir='src') |
| + |
| +chdir = 'relocate/src' |
| +test.relocate('src', chdir) |
| + |
| +test.build('action_dependencies.gyp', 'obj/b.b.o', chdir=chdir) |
| + |
| +# The 'a' actions should be run (letting b.c compile), but the a static library |
| +# should not be built. |
| +test.built_file_must_not_exist('a', type=test.STATIC_LIB, chdir=chdir) |
| +test.built_file_must_not_exist('b', type=test.STATIC_LIB, chdir=chdir) |
| +test.built_file_must_exist('obj/b.b.o', chdir=chdir) |
| + |
| +test.build('action_dependencies.gyp', 'obj/c.c.o', chdir=chdir) |
| + |
| +# 'a' and 'b' should be built, so that the 'c' action succeeds, letting c.c |
| +# compile |
| +test.built_file_must_exist('a', type=test.STATIC_LIB, chdir=chdir) |
| +test.built_file_must_exist('b', type=test.EXECUTABLE, chdir=chdir) |
| +test.built_file_must_exist('obj/c.c.o', chdir=chdir) |
| + |
| + |
| +test.pass_test() |