| 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 postbuilds on static libraries work, and that sourceless | 8 Verifies that a postbuilds on static libraries work, and that sourceless |
| 9 libraries don't cause failures at gyp time. | 9 libraries don't cause failures at gyp time. |
| 10 """ | 10 """ |
| 11 | 11 |
| 12 import TestGyp | 12 import TestGyp |
| 13 | 13 |
| 14 import sys | 14 import sys |
| 15 | 15 |
| 16 if sys.platform == 'darwin': | 16 if sys.platform == 'darwin': |
| 17 test = TestGyp.TestGyp(formats=['make', 'xcode']) | 17 test = TestGyp.TestGyp(formats=['make', 'xcode']) |
| 18 | 18 |
| 19 CHDIR = 'postbuild-static-library' | 19 CHDIR = 'postbuild-static-library' |
| 20 test.run_gyp('test.gyp', chdir=CHDIR) | 20 test.run_gyp('test.gyp', chdir=CHDIR) |
| 21 test.build('test.gyp', 'my_lib', chdir=CHDIR) | 21 test.build('test.gyp', 'my_lib', chdir=CHDIR) |
| 22 # Building my_sourceless_lib doesn't work with make. gyp should probably | 22 # Building my_sourceless_lib doesn't work with make. gyp should probably |
| 23 # forbid sourceless static libraries, since they're pretty pointless. | 23 # forbid sourceless static libraries, since they're pretty pointless. |
| 24 # But they shouldn't cause gyp time exceptions. | 24 # But they shouldn't cause gyp time exceptions. |
| 25 | 25 |
| 26 test.built_file_must_exist('postbuild-file', chdir=CHDIR) | 26 test.built_file_must_exist('postbuild-file', chdir=CHDIR) |
| 27 | 27 |
| 28 test.pass_test() | 28 test.pass_test() |
| OLD | NEW |