| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2012 Google Inc. All rights reserved. | 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """ | 7 """ |
| 8 Verifies that device and simulator bundles are built correctly. | 8 Verifies that device and simulator bundles are built correctly. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 test.fail_test() | 84 test.fail_test() |
| 85 return | 85 return |
| 86 | 86 |
| 87 def ConvertBinaryPlistToXML(path): | 87 def ConvertBinaryPlistToXML(path): |
| 88 proc = subprocess.call(['plutil', '-convert', 'xml1', path], | 88 proc = subprocess.call(['plutil', '-convert', 'xml1', path], |
| 89 stdout=subprocess.PIPE) | 89 stdout=subprocess.PIPE) |
| 90 | 90 |
| 91 if sys.platform == 'darwin': | 91 if sys.platform == 'darwin': |
| 92 test = TestGyp.TestGyp(formats=['ninja', 'xcode']) | 92 test = TestGyp.TestGyp(formats=['ninja', 'xcode']) |
| 93 | 93 |
| 94 test.run_gyp('test-device.gyp', chdir='app-bundle') | 94 test.run_gyp('test-device.gyp', |
| 95 '-G', 'xcode_ninja_target_pattern=^.*$', |
| 96 chdir='app-bundle') |
| 95 | 97 |
| 96 test_configs = ['Default-iphoneos', 'Default'] | 98 test_configs = ['Default-iphoneos', 'Default'] |
| 97 # TODO(justincohen): Disabling 'Default-iphoneos' for xcode until bots are | 99 # TODO(justincohen): Disabling 'Default-iphoneos' for xcode until bots are |
| 98 # configured with signing certs. | 100 # configured with signing certs. |
| 99 if test.format == 'xcode': | 101 if test.format == 'xcode': |
| 100 test_configs.remove('Default-iphoneos') | 102 test_configs.remove('Default-iphoneos') |
| 101 | 103 |
| 102 for configuration in test_configs: | 104 for configuration in test_configs: |
| 103 test.set_configuration(configuration) | 105 test.set_configuration(configuration) |
| 104 test.build('test-device.gyp', 'test_app', chdir='app-bundle') | 106 test.build('test-device.gyp', 'test_app', chdir='app-bundle') |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 plist = plistlib.readPlist(info_plist) | 140 plist = plistlib.readPlist(info_plist) |
| 139 CheckPlistvalue(plist, 'UIDeviceFamily', [1]) | 141 CheckPlistvalue(plist, 'UIDeviceFamily', [1]) |
| 140 | 142 |
| 141 entitlements_file = test.built_file_path('sig_test.xcent', | 143 entitlements_file = test.built_file_path('sig_test.xcent', |
| 142 chdir='app-bundle') | 144 chdir='app-bundle') |
| 143 if os.path.isfile(entitlements_file): | 145 if os.path.isfile(entitlements_file): |
| 144 expected_entitlements = open(entitlements_file).read() | 146 expected_entitlements = open(entitlements_file).read() |
| 145 CheckEntitlements(result_file, expected_entitlements) | 147 CheckEntitlements(result_file, expected_entitlements) |
| 146 | 148 |
| 147 test.pass_test() | 149 test.pass_test() |
| OLD | NEW |