1#!/usr/bin/env python
2
3# Copyright (c) 2011 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 inclusion of $HOME/.gyp/include.gypi works.
9"""
10
11import os
12import TestGyp
13
14test = TestGyp.TestGyp()
15
16os.environ['HOME'] = os.path.abspath('home')
17
18test.run_gyp('all.gyp', chdir='src')
19
20# After relocating, we should still be able to build (build file shouldn't
21# contain relative reference to ~/.gyp/include.gypi)
22test.relocate('src', 'relocate/src')
23
24test.build('all.gyp', test.ALL, chdir='relocate/src')
25
26test.run_built_executable('printfoo',
27                          chdir='relocate/src',
28                          stdout='FOO is fromhome\n')
29
30test.pass_test()
31