OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
| 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 |
| 5 # found in the LICENSE file. |
| 6 |
3 """ | 7 """ |
4 Test actions that output to PRODUCT_DIR. | 8 Test actions that output to PRODUCT_DIR. |
5 """ | 9 """ |
6 | 10 |
7 import TestGyp | 11 import TestGyp |
8 | 12 |
9 # TODO fix this for xcode: http://code.google.com/p/gyp/issues/detail?id=88 | 13 # TODO fix this for xcode: http://code.google.com/p/gyp/issues/detail?id=88 |
10 test = TestGyp.TestGyp(formats=['!xcode']) | 14 test = TestGyp.TestGyp(formats=['!xcode']) |
11 | 15 |
12 test.run_gyp('none.gyp', chdir='src') | 16 test.run_gyp('none.gyp', chdir='src') |
13 | 17 |
14 test.build('none.gyp', test.ALL, chdir='src') | 18 test.build('none.gyp', test.ALL, chdir='src') |
15 | 19 |
16 file_content = 'Hello from make-file.py\n' | 20 file_content = 'Hello from make-file.py\n' |
17 subdir_file_content = 'Hello from make-subdir-file.py\n' | 21 subdir_file_content = 'Hello from make-subdir-file.py\n' |
18 | 22 |
19 if test.format == 'xcode': | 23 if test.format == 'xcode': |
20 test.must_match('src/build/Default/file.out', file_content) | 24 test.must_match('src/build/Default/file.out', file_content) |
21 test.must_match('src/build/Default/subdir_file.out', subdir_file_content) | 25 test.must_match('src/build/Default/subdir_file.out', subdir_file_content) |
22 elif test.format == 'make': | 26 elif test.format == 'make': |
23 test.must_match('src/out/Default/file.out', file_content) | 27 test.must_match('src/out/Default/file.out', file_content) |
24 test.must_match('src/out/Default/subdir_file.out', subdir_file_content) | 28 test.must_match('src/out/Default/subdir_file.out', subdir_file_content) |
25 else: | 29 else: |
26 test.must_match('src/Default/file.out', file_content) | 30 test.must_match('src/Default/file.out', file_content) |
27 test.must_match('src/Default/subdir_file.out', subdir_file_content) | 31 test.must_match('src/Default/subdir_file.out', subdir_file_content) |
28 | 32 |
29 test.pass_test() | 33 test.pass_test() |
OLD | NEW |