gyptest-pass-executable.py 849 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python
  2. # Copyright (c) 2012 Google Inc. All rights reserved.
  3. # Use of this source code is governed by a BSD-style license that can be
  4. # found in the LICENSE file.
  5. """
  6. Checks that gyp does not fail on executable targets which have several files
  7. with the same basename.
  8. """
  9. import TestGyp
  10. # While MSVS supports building executables that contain several files with the
  11. # same name, the msvs gyp generator does not.
  12. test = TestGyp.TestGyp(formats=['!msvs'])
  13. test.run_gyp('double-executable.gyp', chdir='src')
  14. test.relocate('src', 'relocate/src')
  15. test.build('double-executable.gyp', test.ALL, chdir='relocate/src')
  16. expect = """\
  17. Hello from prog3.c
  18. Hello prog3 from func.c
  19. Hello prog3 from subdir1/func.c
  20. Hello prog3 from subdir2/func.c
  21. """
  22. test.run_built_executable('prog3', chdir='relocate/src', stdout=expect)
  23. test.pass_test()