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 building a target and a subsidiary dependent target from a 9.gyp file in a subdirectory, without specifying an explicit output build 10directory, and using the generated solution or project file at the top 11of the tree as the entry point. 12 13The configuration sets the Xcode SYMROOT variable and uses --depth= 14to make Xcode behave like the other build tools--that is, put all 15built targets in a single output build directory at the top of the tree. 16""" 17 18import TestGyp 19 20test = TestGyp.TestGyp() 21 22test.run_gyp('prog1.gyp', '-Dset_symroot=1', '--depth=.', chdir='src') 23 24test.relocate('src', 'relocate/src') 25 26# Suppress the test infrastructure's setting SYMROOT on the command line. 27test.build('prog1.gyp', SYMROOT=None, chdir='relocate/src') 28 29test.run_built_executable('prog1', 30 stdout="Hello from prog1.c\n", 31 chdir='relocate/src') 32 33test.run_built_executable('prog2', 34 stdout="Hello from prog2.c\n", 35 chdir='relocate/src') 36 37test.pass_test() 38