Home | History | Annotate | Download | only in home_dot_gyp
      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 """
      8 Verifies inclusion of $HOME/.gyp/include.gypi works.
      9 """
     10 
     11 import os
     12 import TestGyp
     13 
     14 test = TestGyp.TestGyp()
     15 
     16 os.environ['HOME'] = os.path.abspath('home')
     17 
     18 test.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)
     22 test.relocate('src', 'relocate/src')
     23 
     24 test.build('all.gyp', test.ALL, chdir='relocate/src')
     25 
     26 test.run_built_executable('printfoo',
     27                           chdir='relocate/src',
     28                           stdout='FOO is fromhome\n')
     29 
     30 test.pass_test()
     31