gyptest-default.py 656 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python
  2. # Copyright (c) 2011 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', formats=['msvs'])
  11. # Run from down in foo.
  12. test.run_gyp('a.gyp', chdir='foo/a')
  13. sln = test.workpath('foo/a/a.sln')
  14. sln_data = open(sln, 'rb').read()
  15. vcproj = sln_data.count('b.vcproj')
  16. vcxproj = sln_data.count('b.vcxproj')
  17. if (vcproj, vcxproj) not in [(1, 0), (0, 1)]:
  18. test.fail_test()
  19. test.pass_test()