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 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 # Android doesn't support --generator-output. | 14 # Android doesn't support --generator-output. |
15 test = TestGyp.TestGyp(formats=['!android']) | 15 test = TestGyp.TestGyp(formats=['!android']) |
16 | 16 |
| 17 # Bug: xcode-ninja doesn't respect --generator-output |
| 18 # cf. https://code.google.com/p/gyp/issues/detail?id=442 |
| 19 if test.format == 'xcode-ninja': |
| 20 test.skip_test() |
| 21 |
17 test.writable(test.workpath('src'), False) | 22 test.writable(test.workpath('src'), False) |
18 | 23 |
19 test.run_gyp('prog1.gyp', | 24 test.run_gyp('prog1.gyp', |
20 '-Dset_symroot=1', | 25 '-Dset_symroot=1', |
21 '--generator-output=' + test.workpath('gypfiles'), | 26 '--generator-output=' + test.workpath('gypfiles'), |
22 chdir='src') | 27 chdir='src') |
23 | 28 |
24 test.writable(test.workpath('src'), True) | 29 test.writable(test.workpath('src'), True) |
25 | 30 |
26 test.relocate('src', 'relocate/src') | 31 test.relocate('src', 'relocate/src') |
(...skipping 24 matching lines...) Expand all Loading... |
51 | 56 |
52 if test.format == 'xcode': | 57 if test.format == 'xcode': |
53 chdir = 'relocate/src/subdir2' | 58 chdir = 'relocate/src/subdir2' |
54 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') | 59 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') |
55 | 60 |
56 if test.format == 'xcode': | 61 if test.format == 'xcode': |
57 chdir = 'relocate/src/subdir3' | 62 chdir = 'relocate/src/subdir3' |
58 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') | 63 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') |
59 | 64 |
60 test.pass_test() | 65 test.pass_test() |
OLD | NEW |