blob: 5e4bba0012e5bb639ef94fc1e1571af680f3b1e6 [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"""
8Build a .gyp that depends on 2 gyp files with the same name.
9"""
10
11import TestGyp
12
13test = TestGyp.TestGyp()
14
15test.run_gyp('all.gyp', chdir='src')
16
17test.relocate('src', 'relocate/src')
18
19test.build('all.gyp', chdir='relocate/src')
20
21expect1 = """\
22Hello from main1.cc
23"""
24
25expect2 = """\
26Hello from main2.cc
27"""
28
29if test.format == 'xcode':
30 chdir1 = 'relocate/src/subdir1'
31 chdir2 = 'relocate/src/subdir2'
32else:
33 chdir1 = chdir2 = 'relocate/src'
34
35test.run_built_executable('program1', chdir=chdir1, stdout=expect1)
36test.run_built_executable('program2', chdir=chdir2, stdout=expect2)
37
38test.pass_test()