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 targets have independent INTERMEDIATE_DIRs. | 8 Verifies that targets have independent INTERMEDIATE_DIRs. |
9 """ | 9 """ |
10 | 10 |
11 import TestGyp | 11 import TestGyp |
12 | 12 |
13 import os | |
14 import sys | |
15 | |
16 test = TestGyp.TestGyp() | 13 test = TestGyp.TestGyp() |
17 | 14 |
18 test.run_gyp('test.gyp', chdir='src') | 15 test.run_gyp('test.gyp', chdir='src') |
19 test.build('test.gyp', 'target1', chdir='src') | 16 test.build('test.gyp', 'target1', chdir='src') |
20 # Check stuff exists. | 17 # Check stuff exists. |
21 intermediate_file1 = test.read('src/outfile.txt') | 18 intermediate_file1 = test.read('src/outfile.txt') |
22 test.must_contain(intermediate_file1, 'target1') | 19 test.must_contain(intermediate_file1, 'target1') |
23 | 20 |
24 shared_intermediate_file1 = test.read('src/shared_outfile.txt') | 21 shared_intermediate_file1 = test.read('src/shared_outfile.txt') |
25 test.must_contain(shared_intermediate_file1, 'shared_target1') | 22 test.must_contain(shared_intermediate_file1, 'shared_target1') |
(...skipping 10 matching lines...) Expand all Loading... |
36 test.must_contain(intermediate_file2, 'target2') | 33 test.must_contain(intermediate_file2, 'target2') |
37 | 34 |
38 shared_intermediate_file2 = test.read('src/shared_outfile.txt') | 35 shared_intermediate_file2 = test.read('src/shared_outfile.txt') |
39 if shared_intermediate_file1 != shared_intermediate_file2: | 36 if shared_intermediate_file1 != shared_intermediate_file2: |
40 test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2) | 37 test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2) |
41 | 38 |
42 test.must_contain(shared_intermediate_file1, 'shared_target2') | 39 test.must_contain(shared_intermediate_file1, 'shared_target2') |
43 test.must_contain(shared_intermediate_file2, 'shared_target2') | 40 test.must_contain(shared_intermediate_file2, 'shared_target2') |
44 | 41 |
45 test.pass_test() | 42 test.pass_test() |
OLD | NEW |