gyptest-assembly.py 677 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. A basic test of compiling assembler files.
  7. """
  8. import sys
  9. import TestGyp
  10. if sys.platform != 'win32':
  11. # TODO(bradnelson): get this working for windows.
  12. test = TestGyp.TestGyp(formats=['!msvs'])
  13. test.run_gyp('assembly.gyp', chdir='src')
  14. test.relocate('src', 'relocate/src')
  15. test.build('assembly.gyp', test.ALL, chdir='relocate/src')
  16. expect = """\
  17. Hello from program.c
  18. Got 42.
  19. """
  20. test.run_built_executable('program', chdir='relocate/src', stdout=expect)
  21. test.pass_test()