OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2009 Google Inc. All rights reserved. | 3 # Copyright (c) 2009 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 a project hierarchy created with the --generator-output= | 8 Verifies that a project hierarchy created with the --generator-output= |
9 option can be built even when it's relocated to a different path. | 9 option can be built even when it's relocated to a different path. |
10 """ | 10 """ |
11 | 11 |
12 import TestGyp | 12 import TestGyp |
13 | 13 |
14 test = TestGyp.TestGyp() | 14 # Ninja doesn't support --generator-output. |
| 15 test = TestGyp.TestGyp(formats=['!ninja']) |
15 | 16 |
16 test.writable(test.workpath('src'), False) | 17 test.writable(test.workpath('src'), False) |
17 | 18 |
18 test.run_gyp('prog1.gyp', | 19 test.run_gyp('prog1.gyp', |
19 '-Dset_symroot=1', | 20 '-Dset_symroot=1', |
20 '--generator-output=' + test.workpath('gypfiles'), | 21 '--generator-output=' + test.workpath('gypfiles'), |
21 chdir='src') | 22 chdir='src') |
22 | 23 |
23 test.writable(test.workpath('src'), True) | 24 test.writable(test.workpath('src'), True) |
24 | 25 |
(...skipping 25 matching lines...) Expand all Loading... |
50 | 51 |
51 if test.format == 'xcode': | 52 if test.format == 'xcode': |
52 chdir = 'relocate/src/subdir2' | 53 chdir = 'relocate/src/subdir2' |
53 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') | 54 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') |
54 | 55 |
55 if test.format == 'xcode': | 56 if test.format == 'xcode': |
56 chdir = 'relocate/src/subdir3' | 57 chdir = 'relocate/src/subdir3' |
57 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') | 58 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') |
58 | 59 |
59 test.pass_test() | 60 test.pass_test() |
OLD | NEW |