gyptest-depend-on-bundle.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 dependency on a bundle causes the whole bundle to be built.
  7. """
  8. import TestGyp
  9. import sys
  10. if sys.platform == 'darwin':
  11. test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
  12. test.run_gyp('test.gyp', chdir='depend-on-bundle')
  13. test.build('test.gyp', 'dependent_on_bundle', chdir='depend-on-bundle')
  14. # Binary itself.
  15. test.built_file_must_exist('dependent_on_bundle', chdir='depend-on-bundle')
  16. # Bundle dependency.
  17. test.built_file_must_exist(
  18. 'my_bundle.framework/Versions/A/my_bundle',
  19. chdir='depend-on-bundle')
  20. test.built_file_must_exist( # package_framework
  21. 'my_bundle.framework/my_bundle',
  22. chdir='depend-on-bundle')
  23. test.built_file_must_exist( # plist
  24. 'my_bundle.framework/Versions/A/Resources/Info.plist',
  25. chdir='depend-on-bundle')
  26. test.built_file_must_exist(
  27. 'my_bundle.framework/Versions/A/Resources/English.lproj/' # Resources
  28. 'InfoPlist.strings',
  29. chdir='depend-on-bundle')
  30. test.pass_test()