Home | History | Annotate | Download | only in mac
      1 #!/usr/bin/env python
      2 
      3 # Copyright (c) 2012 Google Inc. All rights reserved.
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 """
      8 Verifies that app bundles are built correctly.
      9 """
     10 
     11 import TestGyp
     12 
     13 import sys
     14 
     15 if sys.platform == 'darwin':
     16   test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
     17 
     18   test.run_gyp('framework.gyp', chdir='framework')
     19 
     20   test.build('framework.gyp', 'test_framework', chdir='framework')
     21 
     22   # Binary
     23   test.built_file_must_exist(
     24       'Test Framework.framework/Versions/A/Test Framework',
     25       chdir='framework')
     26 
     27   # Info.plist
     28   test.built_file_must_exist(
     29       'Test Framework.framework/Versions/A/Resources/Info.plist',
     30       chdir='framework')
     31 
     32   # Resources
     33   test.built_file_must_exist(
     34       'Test Framework.framework/Versions/A/Resources/English.lproj/'
     35       'InfoPlist.strings',
     36       chdir='framework')
     37 
     38   # Symlinks created by packaging process
     39   test.built_file_must_exist('Test Framework.framework/Versions/Current',
     40                              chdir='framework')
     41   test.built_file_must_exist('Test Framework.framework/Resources',
     42                              chdir='framework')
     43   test.built_file_must_exist('Test Framework.framework/Test Framework',
     44                              chdir='framework')
     45   # PkgInfo.
     46   test.built_file_must_not_exist(
     47       'Test Framework.framework/Versions/A/Resources/PkgInfo',
     48       chdir='framework')
     49 
     50   test.pass_test()
     51