gyptest-default.py 635 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. # Copyright (c) 2009 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. import TestGyp
  6. test = TestGyp.TestGyp()
  7. test.run_gyp('multiple.gyp', chdir='src')
  8. test.relocate('src', 'relocate/src')
  9. test.build('multiple.gyp', chdir='relocate/src')
  10. expect1 = """\
  11. hello from prog1.c
  12. hello from common.c
  13. """
  14. expect2 = """\
  15. hello from prog2.c
  16. hello from common.c
  17. """
  18. test.run_built_executable('prog1', stdout=expect1, chdir='relocate/src')
  19. test.run_built_executable('prog2', stdout=expect2, chdir='relocate/src')
  20. test.pass_test()