Home | History | Annotate | Download | only in ios
      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 ios 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=['xcode', 'ninja'])
     17 
     18   test.run_gyp('test.gyp', chdir='app-bundle')
     19 
     20   test.build('test.gyp', test.ALL, chdir='app-bundle')
     21 
     22   # Test that the extension is .bundle
     23   test.built_file_must_exist('Test App Gyp.app/Test App Gyp',
     24                              chdir='app-bundle')
     25 
     26   # Info.plist
     27   info_plist = test.built_file_path('Test App Gyp.app/Info.plist',
     28                                     chdir='app-bundle')
     29   # Resources
     30   test.built_file_must_exist(
     31       'Test App Gyp.app/English.lproj/InfoPlist.strings',
     32       chdir='app-bundle')
     33   test.built_file_must_exist(
     34       'Test App Gyp.app/English.lproj/MainMenu.nib',
     35       chdir='app-bundle')
     36   test.built_file_must_exist(
     37       'Test App Gyp.app/English.lproj/Main_iPhone.storyboardc',
     38       chdir='app-bundle')
     39 
     40   # Packaging
     41   test.built_file_must_exist('Test App Gyp.app/PkgInfo',
     42                              chdir='app-bundle')
     43   test.built_file_must_match('Test App Gyp.app/PkgInfo', 'APPLause',
     44                              chdir='app-bundle')
     45 
     46   test.pass_test()
     47