OLD | NEW |
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 Verifies that .d files and all.deps are properly generated. | 8 Verifies that .d files and all.deps are properly generated. |
9 """ | 9 """ |
10 | 10 |
11 import os | |
12 import TestGyp | 11 import TestGyp |
13 | 12 |
14 # .d files are only used by the make build. | 13 # .d files are only used by the make build. |
15 test = TestGyp.TestGyp(formats=['make']) | 14 test = TestGyp.TestGyp(formats=['make']) |
16 | 15 |
17 test.run_gyp('dependencies.gyp') | 16 test.run_gyp('dependencies.gyp') |
18 | 17 |
19 test.build('dependencies.gyp', test.ALL) | 18 test.build('dependencies.gyp', test.ALL) |
20 | 19 |
21 deps_file = test.built_file_path(".deps/out/Default/obj.target/main/main.o.d") | 20 deps_file = test.built_file_path(".deps/out/Default/obj.target/main/main.o.d") |
22 test.must_contain(deps_file, "main.h") | 21 test.must_contain(deps_file, "main.h") |
23 | 22 |
24 # Build a second time to make sure we generate all.deps. | 23 # Build a second time to make sure we generate all.deps. |
25 test.build('dependencies.gyp', test.ALL) | 24 test.build('dependencies.gyp', test.ALL) |
26 | 25 |
27 test.pass_test() | 26 test.pass_test() |
OLD | NEW |