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