1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/tools/gyp/test/generator-output/gyptest-subdir2-deep.py Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +# Copyright (c) 2012 Google Inc. All rights reserved. 1.7 +# Use of this source code is governed by a BSD-style license that can be 1.8 +# found in the LICENSE file. 1.9 + 1.10 +""" 1.11 +Verifies building a target from a .gyp file a few subdirectories 1.12 +deep when the --generator-output= option is used to put the build 1.13 +configuration files in a separate directory tree. 1.14 +""" 1.15 + 1.16 +import TestGyp 1.17 + 1.18 +# Ninja and Android don't support --generator-output. 1.19 +test = TestGyp.TestGyp(formats=['!ninja', '!android']) 1.20 + 1.21 +test.writable(test.workpath('src'), False) 1.22 + 1.23 +test.writable(test.workpath('src/subdir2/deeper/build'), True) 1.24 + 1.25 +test.run_gyp('deeper.gyp', 1.26 + '-Dset_symroot=1', 1.27 + '--generator-output=' + test.workpath('gypfiles'), 1.28 + chdir='src/subdir2/deeper') 1.29 + 1.30 +test.build('deeper.gyp', test.ALL, chdir='gypfiles') 1.31 + 1.32 +chdir = 'gypfiles' 1.33 + 1.34 +if test.format == 'xcode': 1.35 + chdir = 'src/subdir2/deeper' 1.36 +test.run_built_executable('deeper', 1.37 + chdir=chdir, 1.38 + stdout="Hello from deeper.c\n") 1.39 + 1.40 +test.pass_test()