initial import
[vuplus_webkit] / Source / ThirdParty / gyp / test / include_dirs / 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 Verifies use of include_dirs when using the default build target.
9 """
10
11 import TestGyp
12
13 test = TestGyp.TestGyp()
14
15 if test.format == 'scons':
16   test.skip_test('TODO: http://code.google.com/p/gyp/issues/detail?id=176\n')
17
18 test.run_gyp('includes.gyp', chdir='src')
19
20 test.relocate('src', 'relocate/src')
21
22 test.build('includes.gyp', test.ALL, chdir='relocate/src')
23
24 expect = """\
25 Hello from includes.c
26 Hello from inc.h
27 Hello from include1.h
28 Hello from subdir/inc2/include2.h
29 Hello from shadow2/shadow.h
30 """
31 test.run_built_executable('includes', stdout=expect, chdir='relocate/src')
32
33 if test.format == 'xcode':
34   chdir='relocate/src/subdir'
35 else:
36   chdir='relocate/src'
37
38 expect = """\
39 Hello from subdir/subdir_includes.c
40 Hello from subdir/inc.h
41 Hello from include1.h
42 Hello from subdir/inc2/include2.h
43 """
44 test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir)
45
46 test.pass_test()