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 two actions can be attached to the same input files. | 8 Verifies two actions can be attached to the same input files. |
9 """ | 9 """ |
10 | 10 |
11 import TestGyp | 11 import TestGyp |
12 | 12 |
13 test = TestGyp.TestGyp() | 13 test = TestGyp.TestGyp() |
14 | 14 |
15 test.run_gyp('actions.gyp', chdir='src') | 15 test.run_gyp('actions.gyp', chdir='src') |
16 | 16 |
17 test.relocate('src', 'relocate/src') | 17 test.relocate('src', 'relocate/src') |
18 | 18 |
19 # Test that multiple actions in a 'none' target that | |
20 # depend on another 'none' target cause depended on target to | |
21 # run individually. | |
22 # This is only relevant to the make generator. | |
Nico
2012/05/28 16:43:53
Why can't you run this test for other generators?
bradn
2012/05/29 21:21:47
You can only do this with generators / build tools
| |
23 if test.format == 'make': | |
24 test.build('actions.gyp', chdir='relocate/src', target='multi2.txt') | |
25 test.must_contain('relocate/src/multi2.txt', 'hello there') | |
26 test.must_contain('relocate/src/multi_dep.txt', 'hello there') | |
27 | |
28 | |
19 # Test that two actions can be attached to the same inputs. | 29 # Test that two actions can be attached to the same inputs. |
20 test.build('actions.gyp', test.ALL, chdir='relocate/src') | 30 test.build('actions.gyp', test.ALL, chdir='relocate/src') |
21 test.must_contain('relocate/src/output1.txt', 'hello there') | 31 test.must_contain('relocate/src/output1.txt', 'hello there') |
22 test.must_contain('relocate/src/output2.txt', 'hello there') | 32 test.must_contain('relocate/src/output2.txt', 'hello there') |
23 test.must_contain('relocate/src/output3.txt', 'hello there') | 33 test.must_contain('relocate/src/output3.txt', 'hello there') |
24 test.must_contain('relocate/src/output4.txt', 'hello there') | 34 test.must_contain('relocate/src/output4.txt', 'hello there') |
25 | 35 |
26 # Test that process_outputs_as_sources works in conjuction with merged | 36 # Test that process_outputs_as_sources works in conjuction with merged |
27 # actions. | 37 # actions. |
28 test.run_built_executable( | 38 test.run_built_executable( |
29 'multiple_action_source_filter', | 39 'multiple_action_source_filter', |
30 chdir='relocate/src', | 40 chdir='relocate/src', |
31 stdout=( | 41 stdout=( |
32 '{\n' | 42 '{\n' |
33 'bar\n' | 43 'bar\n' |
34 'car\n' | 44 'car\n' |
35 'dar\n' | 45 'dar\n' |
36 'ear\n' | 46 'ear\n' |
37 '}\n' | 47 '}\n' |
38 ), | 48 ), |
39 ) | 49 ) |
40 | 50 |
41 | 51 |
42 test.pass_test() | 52 test.pass_test() |
OLD | NEW |