Chromium Code Reviews| 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 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 import errno | 14 import errno |
| 15 | 15 |
| 16 test = TestGyp.TestGyp(formats=['ninja', 'make']) | 16 test = TestGyp.TestGyp(formats=['ninja', 'make']) |
| 17 if test.format == 'xcode-ninja': | |
|
sdefresne
2014/09/02 15:13:06
Please document.
Tobias
2014/10/02 18:19:20
This test actually was working by chance only. The
| |
| 18 test.skip_test() | |
| 17 | 19 |
| 18 # We want our Makefile to be one dir up from main.gyp. | 20 # We want our Makefile to be one dir up from main.gyp. |
| 19 test.run_gyp('main.gyp', '--toplevel-dir=..', chdir='src/sub1') | 21 test.run_gyp('main.gyp', '--toplevel-dir=..', chdir='src/sub1') |
| 20 | 22 |
| 21 toplevel_dir = 'src' | 23 toplevel_dir = 'src' |
| 22 | 24 |
| 23 test.build('all', chdir=toplevel_dir) | 25 test.build('all', chdir=toplevel_dir) |
| 24 | 26 |
| 25 test.built_file_must_exist('prog1', type=test.EXECUTABLE, chdir=toplevel_dir) | 27 test.built_file_must_exist('prog1', type=test.EXECUTABLE, chdir=toplevel_dir) |
| 26 | 28 |
| 27 test.run_built_executable('prog1', | 29 test.run_built_executable('prog1', |
| 28 chdir=toplevel_dir, | 30 chdir=toplevel_dir, |
| 29 stdout="Hello from prog1.c\n") | 31 stdout="Hello from prog1.c\n") |
| 30 | 32 |
| 31 test.pass_test() | 33 test.pass_test() |
| OLD | NEW |