| 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 project hierarchy created when the --generator-output= | 8 Verifies building a project hierarchy created when the --generator-output= |
| 9 option is used to put the build configuration files in a separate | 9 option is used to put the build configuration files in a separate |
| 10 directory tree. | 10 directory tree. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 import TestGyp | 13 import TestGyp |
| 14 | 14 |
| 15 # Android doesn't support --generator-output. | 15 # Android doesn't support --generator-output. |
| 16 test = TestGyp.TestGyp(formats=['!android']) | 16 test = TestGyp.TestGyp(formats=['!android']) |
| 17 | 17 |
| 18 # Bug: xcode-ninja doesn't respect --generator-output | |
| 19 # cf. https://code.google.com/p/gyp/issues/detail?id=442 | |
| 20 if test.format == 'xcode-ninja': | |
| 21 test.skip_test() | |
| 22 | |
| 23 test.writable(test.workpath('src'), False) | 18 test.writable(test.workpath('src'), False) |
| 24 | 19 |
| 25 test.run_gyp('prog1.gyp', | 20 test.run_gyp('prog1.gyp', |
| 26 '-Dset_symroot=1', | 21 '-Dset_symroot=1', |
| 27 '--generator-output=' + test.workpath('gypfiles'), | 22 '--generator-output=' + test.workpath('gypfiles'), |
| 28 chdir='src') | 23 chdir='src') |
| 29 | 24 |
| 30 test.writable(test.workpath('src/build'), True) | 25 test.writable(test.workpath('src/build'), True) |
| 31 test.writable(test.workpath('src/subdir2/build'), True) | 26 test.writable(test.workpath('src/subdir2/build'), True) |
| 32 test.writable(test.workpath('src/subdir3/build'), True) | 27 test.writable(test.workpath('src/subdir3/build'), True) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 50 | 45 |
| 51 if test.format == 'xcode': | 46 if test.format == 'xcode': |
| 52 chdir = 'src/subdir2' | 47 chdir = 'src/subdir2' |
| 53 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') | 48 test.run_built_executable('prog2', chdir=chdir, stdout=expect % 'prog2.c') |
| 54 | 49 |
| 55 if test.format == 'xcode': | 50 if test.format == 'xcode': |
| 56 chdir = 'src/subdir3' | 51 chdir = 'src/subdir3' |
| 57 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') | 52 test.run_built_executable('prog3', chdir=chdir, stdout=expect % 'prog3.c') |
| 58 | 53 |
| 59 test.pass_test() | 54 test.pass_test() |
| OLD | NEW |