• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"""
8Verifies use of include_dirs when using the default build target.
9"""
10
11import TestGyp
12
13test = TestGyp.TestGyp()
14
15test.run_gyp('includes.gyp', chdir='src')
16
17test.relocate('src', 'relocate/src')
18
19test.build('includes.gyp', test.ALL, chdir='relocate/src')
20
21expect = """\
22Hello from includes.c
23Hello from inc.h
24Hello from include1.h
25Hello from subdir/inc2/include2.h
26Hello from shadow2/shadow.h
27"""
28test.run_built_executable('includes', stdout=expect, chdir='relocate/src')
29
30if test.format == 'xcode':
31  chdir='relocate/src/subdir'
32else:
33  chdir='relocate/src'
34
35expect = """\
36Hello from subdir/subdir_includes.c
37Hello from subdir/inc.h
38Hello from include1.h
39Hello from subdir/inc2/include2.h
40"""
41test.run_built_executable('subdir_includes', stdout=expect, chdir=chdir)
42
43test.pass_test()
44