Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: test/actions-multiple/gyptest-all.py

Issue 10454038: Fixing make generator handling of multiple actions in a dependent target. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/generator/make.py ('k') | test/actions-multiple/src/actions.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2011 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 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 sys
12
11 import TestGyp 13 import TestGyp
12 14
13 test = TestGyp.TestGyp() 15 test = TestGyp.TestGyp()
14 16
15 test.run_gyp('actions.gyp', chdir='src') 17 test.run_gyp('actions.gyp', chdir='src')
16 18
17 test.relocate('src', 'relocate/src') 19 test.relocate('src', 'relocate/src')
18 20
21 # Test of fine-grained dependencies for generators that can build individual
22 # files on demand.
23 # In particular:
24 # - TargetA depends on TargetB.
25 # - TargetA and TargetB are 'none' type with actions attached.
26 # - TargetA has multiple actions.
27 # - An output from one of the actions in TargetA (not the first listed),
28 # is requested as the build target.
29 # Ensure that TargetB gets built.
30 #
31 # This sub-test can only be done with generators/build tools that can
32 # be asked to build individual files rather than whole targets (make, ninja).
33 if test.format in ['make', 'ninja']:
34 # Select location of target based on generator.
35 if test.format == 'make':
36 target = 'multi2.txt'
37 elif test.format == 'ninja':
38 if sys.platform in ['win32', 'cygwin']:
39 target = '..\\..\\multi2.txt'
40 else:
41 target = '../../multi2.txt'
42 else:
43 assert False
44 test.build('actions.gyp', chdir='relocate/src', target=target)
45 test.must_contain('relocate/src/multi2.txt', 'hello there')
46 test.must_contain('relocate/src/multi_dep.txt', 'hello there')
47
48
19 # Test that two actions can be attached to the same inputs. 49 # Test that two actions can be attached to the same inputs.
20 test.build('actions.gyp', test.ALL, chdir='relocate/src') 50 test.build('actions.gyp', test.ALL, chdir='relocate/src')
21 test.must_contain('relocate/src/output1.txt', 'hello there') 51 test.must_contain('relocate/src/output1.txt', 'hello there')
22 test.must_contain('relocate/src/output2.txt', 'hello there') 52 test.must_contain('relocate/src/output2.txt', 'hello there')
23 test.must_contain('relocate/src/output3.txt', 'hello there') 53 test.must_contain('relocate/src/output3.txt', 'hello there')
24 test.must_contain('relocate/src/output4.txt', 'hello there') 54 test.must_contain('relocate/src/output4.txt', 'hello there')
25 55
26 # Test that process_outputs_as_sources works in conjuction with merged 56 # Test that process_outputs_as_sources works in conjuction with merged
27 # actions. 57 # actions.
28 test.run_built_executable( 58 test.run_built_executable(
29 'multiple_action_source_filter', 59 'multiple_action_source_filter',
30 chdir='relocate/src', 60 chdir='relocate/src',
31 stdout=( 61 stdout=(
32 '{\n' 62 '{\n'
33 'bar\n' 63 'bar\n'
34 'car\n' 64 'car\n'
35 'dar\n' 65 'dar\n'
36 'ear\n' 66 'ear\n'
37 '}\n' 67 '}\n'
38 ), 68 ),
39 ) 69 )
40 70
41 71
42 test.pass_test() 72 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/make.py ('k') | test/actions-multiple/src/actions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698