gyptest-cross.py 655 B

12345678910111213141516171819202122232425262728293031
  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. Verifies that actions can be + a source scanner can be used to implement,
  7. cross-compiles (for Native Client at this point).
  8. """
  9. import TestGyp
  10. test = TestGyp.TestGyp()
  11. test.run_gyp('cross.gyp', chdir='src')
  12. test.relocate('src', 'relocate/src')
  13. test.build('cross.gyp', test.ALL, chdir='relocate/src')
  14. expect = """\
  15. From test1.cc
  16. From test2.c
  17. From test3.cc
  18. From test4.c
  19. """
  20. test.run_built_executable('program', chdir='relocate/src', stdout=expect)
  21. test.pass_test()