initial import
[vuplus_webkit] / Source / ThirdParty / gyp / test / same-name / gyptest-default.py
1 #!/usr/bin/env python
2
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.
6
7 """
8 Build a .gyp with two targets that share a common .c source file.
9 """
10
11 import TestGyp
12
13 test = TestGyp.TestGyp()
14
15 test.run_gyp('all.gyp', chdir='src')
16
17 test.relocate('src', 'relocate/src')
18
19 test.build('all.gyp', chdir='relocate/src')
20
21 expect1 = """\
22 Hello from prog1.c
23 Hello prog1 from func.c
24 """
25
26 expect2 = """\
27 Hello from prog2.c
28 Hello prog2 from func.c
29 """
30
31 test.run_built_executable('prog1', chdir='relocate/src', stdout=expect1)
32 test.run_built_executable('prog2', chdir='relocate/src', stdout=expect2)
33
34 test.pass_test()