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 building a subsidiary dependent target from a .gyp file in a | 8 Verifies building a subsidiary dependent target from a .gyp file in a |
9 subdirectory, without specifying an explicit output build directory, | 9 subdirectory, without specifying an explicit output build directory, |
10 and using the subdirectory's solution or project file as the entry point. | 10 and using the subdirectory's solution or project file as the entry point. |
11 """ | 11 """ |
12 | 12 |
13 import TestGyp | 13 import TestGyp |
14 | 14 |
15 # Android doesn't support running from subdirectories. | 15 # Android doesn't support running from subdirectories. |
16 # Ninja doesn't support relocation. | 16 # Ninja doesn't support relocation. |
17 test = TestGyp.TestGyp(formats=['!ninja', '!android']) | 17 # CMake produces a single CMakeLists.txt in the output directory. |
| 18 test = TestGyp.TestGyp(formats=['!ninja', '!android', '!cmake']) |
18 | 19 |
19 test.run_gyp('prog1.gyp', chdir='src') | 20 test.run_gyp('prog1.gyp', chdir='src') |
20 | 21 |
21 test.relocate('src', 'relocate/src') | 22 test.relocate('src', 'relocate/src') |
22 | 23 |
23 chdir = 'relocate/src/subdir' | 24 chdir = 'relocate/src/subdir' |
24 target = test.ALL | 25 target = test.ALL |
25 | 26 |
26 test.build('prog2.gyp', target, chdir=chdir) | 27 test.build('prog2.gyp', target, chdir=chdir) |
27 | 28 |
28 test.built_file_must_not_exist('prog1', type=test.EXECUTABLE, chdir=chdir) | 29 test.built_file_must_not_exist('prog1', type=test.EXECUTABLE, chdir=chdir) |
29 | 30 |
30 test.run_built_executable('prog2', | 31 test.run_built_executable('prog2', |
31 chdir=chdir, | 32 chdir=chdir, |
32 stdout="Hello from prog2.c\n") | 33 stdout="Hello from prog2.c\n") |
33 | 34 |
34 test.pass_test() | 35 test.pass_test() |
OLD | NEW |