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.
8
Verifies that a rule that generates multiple outputs rebuilds
9
correctly when the inputs change.
14
test = TestGyp.TestGyp()
16
if test.format == 'msvs':
17
msg = 'TODO: issue 120: disabled on MSVS due to test execution problems.\n'
20
test.run_gyp('same_target.gyp', chdir='src')
22
test.relocate('src', 'relocate/src')
25
test.build('same_target.gyp', chdir='relocate/src')
33
test.run_built_executable('program', chdir='relocate/src', stdout=expect)
35
test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
39
contents = test.read(['relocate', 'src', 'prog1.in'])
40
contents = contents.replace('!', ' AGAIN!')
41
test.write(['relocate', 'src', 'prog1.in'], contents)
43
test.build('same_target.gyp', chdir='relocate/src')
47
Hello from prog1.in AGAIN!
51
test.run_built_executable('program', chdir='relocate/src', stdout=expect)
53
test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')
57
contents = test.read(['relocate', 'src', 'prog2.in'])
58
contents = contents.replace('!', ' AGAIN!')
59
test.write(['relocate', 'src', 'prog2.in'], contents)
61
test.build('same_target.gyp', chdir='relocate/src')
65
Hello from prog1.in AGAIN!
66
Hello from prog2.in AGAIN!
69
test.run_built_executable('program', chdir='relocate/src', stdout=expect)
71
test.up_to_date('same_target.gyp', 'program', chdir='relocate/src')