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