blob: 1a3dcda23d56690f725f6213a6a72d1ece6d16a7 [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"""
8Checks that gyp does not fail on executable targets which have several files
9with the same basename.
10"""
11
12import TestGyp
13
14# While MSVS supports building executables that contain several files with the
15# same name, the msvs gyp generator does not.
16test = TestGyp.TestGyp(formats=['!msvs'])
17
18test.run_gyp('double-executable.gyp', chdir='src')
19
20test.relocate('src', 'relocate/src')
21
22test.build('double-executable.gyp', test.ALL, chdir='relocate/src')
23
24expect = """\
25Hello from prog3.c
26Hello prog3 from func.c
27Hello prog3 from subdir1/func.c
28Hello prog3 from subdir2/func.c
29"""
30
31test.run_built_executable('prog3', chdir='relocate/src', stdout=expect)
32
33test.pass_test()