gyptest-build.py 977 B

123456789101112131415161718192021222324252627282930313233
  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 simplest-possible build of a "Hello, world!" program
  7. using the default build target.
  8. """
  9. import TestGyp
  10. test = TestGyp.TestGyp(workdir='workarea_default')
  11. if test.format == 'android':
  12. # This test currently fails on android. Investigate why, fix the issues
  13. # responsible, and reenable this test on android. See bug:
  14. # https://code.google.com/p/gyp/issues/detail?id=436
  15. test.skip_test(message='Test fails on android. Fix and reenable.\n')
  16. if test.format == 'xcode-ninja':
  17. # The xcode-ninja generator doesn't support --build
  18. # cf. https://code.google.com/p/gyp/issues/detail?id=453
  19. test.skip_test()
  20. test.run_gyp('hello.gyp', '--build=Default')
  21. test.run_built_executable('hello', stdout="Hello, world!\n")
  22. test.up_to_date('hello.gyp', test.DEFAULT)
  23. test.pass_test()