| 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 simplest-possible build of a "Hello, world!" program | 8 Verifies simplest-possible build of a "Hello, world!" program |
| 9 using the default build target. | 9 using the default build target. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 import TestGyp | 12 import TestGyp |
| 13 | 13 |
| 14 # Android does not support setting the build directory. | 14 # Android does not support setting the build directory. |
| 15 test = TestGyp.TestGyp(formats=['!android']) | 15 test = TestGyp.TestGyp(formats=['!android']) |
| 16 | 16 |
| 17 test.run_gyp('product.gyp') | 17 test.run_gyp('product.gyp', '-G', 'xcode_ninja_target_pattern=^.*$') |
| 18 test.build('product.gyp') | 18 test.build('product.gyp') |
| 19 | 19 |
| 20 # executables | 20 # executables |
| 21 test.built_file_must_exist('alt1' + test._exe, test.EXECUTABLE, bare=True) | 21 test.built_file_must_exist('alt1' + test._exe, test.EXECUTABLE, bare=True) |
| 22 test.built_file_must_exist('hello2.stuff', test.EXECUTABLE, bare=True) | 22 test.built_file_must_exist('hello2.stuff', test.EXECUTABLE, bare=True) |
| 23 test.built_file_must_exist('yoalt3.stuff', test.EXECUTABLE, bare=True) | 23 test.built_file_must_exist('yoalt3.stuff', test.EXECUTABLE, bare=True) |
| 24 | 24 |
| 25 # shared libraries | 25 # shared libraries |
| 26 test.built_file_must_exist(test.dll_ + 'alt4' + test._dll, | 26 test.built_file_must_exist(test.dll_ + 'alt4' + test._dll, |
| 27 test.SHARED_LIB, bare=True) | 27 test.SHARED_LIB, bare=True) |
| 28 test.built_file_must_exist(test.dll_ + 'hello5.stuff', | 28 test.built_file_must_exist(test.dll_ + 'hello5.stuff', |
| 29 test.SHARED_LIB, bare=True) | 29 test.SHARED_LIB, bare=True) |
| 30 test.built_file_must_exist('yoalt6.stuff', test.SHARED_LIB, bare=True) | 30 test.built_file_must_exist('yoalt6.stuff', test.SHARED_LIB, bare=True) |
| 31 | 31 |
| 32 # static libraries | 32 # static libraries |
| 33 test.built_file_must_exist(test.lib_ + 'alt7' + test._lib, | 33 test.built_file_must_exist(test.lib_ + 'alt7' + test._lib, |
| 34 test.STATIC_LIB, bare=True) | 34 test.STATIC_LIB, bare=True) |
| 35 test.built_file_must_exist(test.lib_ + 'hello8.stuff', | 35 test.built_file_must_exist(test.lib_ + 'hello8.stuff', |
| 36 test.STATIC_LIB, bare=True) | 36 test.STATIC_LIB, bare=True) |
| 37 test.built_file_must_exist('yoalt9.stuff', test.STATIC_LIB, bare=True) | 37 test.built_file_must_exist('yoalt9.stuff', test.STATIC_LIB, bare=True) |
| 38 | 38 |
| 39 # alternate product_dir | 39 # alternate product_dir |
| 40 test.built_file_must_exist('bob/yoalt10.stuff', test.EXECUTABLE, bare=True) | 40 test.built_file_must_exist('bob/yoalt10.stuff', test.EXECUTABLE, bare=True) |
| 41 test.built_file_must_exist('bob/yoalt11.stuff', test.EXECUTABLE, bare=True) | 41 test.built_file_must_exist('bob/yoalt11.stuff', test.EXECUTABLE, bare=True) |
| 42 test.built_file_must_exist('bob/yoalt12.stuff', test.EXECUTABLE, bare=True) | 42 test.built_file_must_exist('bob/yoalt12.stuff', test.EXECUTABLE, bare=True) |
| 43 | 43 |
| 44 test.pass_test() | 44 test.pass_test() |
| OLD | NEW |