Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 #!/usr/bin/env python
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.
7 """
8 Build a .gyp with two targets that share a common .c source file.
9 """
11 import TestGyp
13 test = TestGyp.TestGyp()
15 test.run_gyp('all.gyp', chdir='src')
17 test.relocate('src', 'relocate/src')
19 test.build('all.gyp', chdir='relocate/src')
21 expect1 = """\
22 Hello from prog1.c
23 Hello prog1 from func.c
24 """
26 expect2 = """\
27 Hello from prog2.c
28 Hello prog2 from func.c
29 """
31 test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1)
32 test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2)
34 test.pass_test()