OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2011 Google Inc. All rights reserved. | 3 # Copyright (c) 2011 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 |
(...skipping 11 matching lines...) Expand all Loading... |
22 test.must_contain(intermediate_file1, 'target1') | 22 test.must_contain(intermediate_file1, 'target1') |
23 | 23 |
24 shared_intermediate_file1 = test.read('src/shared_outfile.txt') | 24 shared_intermediate_file1 = test.read('src/shared_outfile.txt') |
25 test.must_contain(shared_intermediate_file1, 'shared_target1') | 25 test.must_contain(shared_intermediate_file1, 'shared_target1') |
26 | 26 |
27 test.run_gyp('test2.gyp', chdir='src') | 27 test.run_gyp('test2.gyp', chdir='src') |
28 # Force the shared intermediate to be rebuilt. | 28 # Force the shared intermediate to be rebuilt. |
29 test.sleep() | 29 test.sleep() |
30 test.touch('src/shared_infile.txt') | 30 test.touch('src/shared_infile.txt') |
31 test.build('test2.gyp', 'target2', chdir='src') | 31 test.build('test2.gyp', 'target2', chdir='src') |
32 # Check INTERMEDIATE_DIR file didn't get overwritten but SHARED_INTERMEDIAT_DIR | 32 # Check INTERMEDIATE_DIR file didn't get overwritten but SHARED_INTERMEDIATE_DIR |
33 # file did. | 33 # file did. |
34 intermediate_file2 = test.read('src/outfile.txt') | 34 intermediate_file2 = test.read('src/outfile.txt') |
35 test.must_contain(intermediate_file1, 'target1') | 35 test.must_contain(intermediate_file1, 'target1') |
36 test.must_contain(intermediate_file2, 'target2') | 36 test.must_contain(intermediate_file2, 'target2') |
37 | 37 |
38 shared_intermediate_file2 = test.read('src/shared_outfile.txt') | 38 shared_intermediate_file2 = test.read('src/shared_outfile.txt') |
39 if shared_intermediate_file1 != shared_intermediate_file2: | 39 if shared_intermediate_file1 != shared_intermediate_file2: |
40 test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2) | 40 test.fail_test(shared_intermediate_file1 + ' != ' + shared_intermediate_file2) |
41 | 41 |
42 test.must_contain(shared_intermediate_file1, 'shared_target2') | 42 test.must_contain(shared_intermediate_file1, 'shared_target2') |
43 test.must_contain(shared_intermediate_file2, 'shared_target2') | 43 test.must_contain(shared_intermediate_file2, 'shared_target2') |
44 | 44 |
45 test.pass_test() | 45 test.pass_test() |
OLD | NEW |