gyptest-override.py 610 B

123456789101112131415161718192021222324
  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. Make sure that manual rules on Windows override the built in ones.
  7. """
  8. import sys
  9. import TestGyp
  10. if sys.platform == 'win32':
  11. test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
  12. CHDIR = 'src'
  13. test.run_gyp('override.gyp', chdir=CHDIR)
  14. test.build('override.gyp', test.ALL, chdir=CHDIR)
  15. expect = """\
  16. Hello from program.c
  17. Got 42.
  18. """
  19. test.run_built_executable('program', chdir=CHDIR, stdout=expect)
  20. test.pass_test()