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.bundle/Test App Gyp', 24 chdir='app-bundle') 25 26 # Info.plist 27 info_plist = test.built_file_path('Test App Gyp.bundle/Info.plist', 28 chdir='app-bundle') 29 # Resources 30 test.built_file_must_exist( 31 'Test App Gyp.bundle/English.lproj/InfoPlist.strings', 32 chdir='app-bundle') 33 test.built_file_must_exist( 34 'Test App Gyp.bundle/English.lproj/MainMenu.nib', 35 chdir='app-bundle') 36 37 # Packaging 38 test.built_file_must_exist('Test App Gyp.bundle/PkgInfo', 39 chdir='app-bundle') 40 test.built_file_must_match('Test App Gyp.bundle/PkgInfo', 'APPLause', 41 chdir='app-bundle') 42 43 test.pass_test() 44