blob: ec7862ddd91e2ec7f2a406334b4722d8c373dba8 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2
3# Copyright (c) 2012 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 from a .gyp file a few subdirectories
9deep when the --generator-output= option is used to put the build
10configuration files in a separate directory tree.
11"""
12
13import TestGyp
14
15test = TestGyp.TestGyp()
16
17test.writable(test.workpath('src'), False)
18
19test.writable(test.workpath('src/subdir2/deeper/build'), True)
20
21test.run_gyp('deeper.gyp',
22 '-Dset_symroot=1',
23 '--generator-output=' + test.workpath('gypfiles'),
24 chdir='src/subdir2/deeper')
25
26test.build('deeper.gyp', test.ALL, chdir='gypfiles')
27
28chdir = 'gypfiles'
29
30if test.format == 'xcode':
31 chdir = 'src/subdir2/deeper'
32test.run_built_executable('deeper',
33 chdir=chdir,
34 stdout="Hello from deeper.c\n")
35
36test.pass_test()