1
0

gyptest-postbuild-defaults.py 656 B

1234567891011121314151617181920212223242526272829
  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 a postbuild invoking |defaults| works.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'darwin':
  11. test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
  12. CHDIR = 'postbuild-defaults'
  13. test.run_gyp('test.gyp', chdir=CHDIR)
  14. test.build('test.gyp', test.ALL, chdir=CHDIR)
  15. result_file = test.built_file_path('result', chdir=CHDIR)
  16. test.must_exist(result_file)
  17. test.must_contain(result_file, '''\
  18. Test
  19. ${PRODUCT_NAME}
  20. ''')
  21. test.pass_test()