OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 | |
3 # Copyright (c) 2015 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 XCTests can be built correctly. | |
9 """ | |
10 | |
11 import TestGyp | |
12 | |
13 import subprocess | |
14 import sys | |
15 | |
16 def HasCerts(): | |
17 # Because the bots do not have certs, don't check them if there are no | |
18 # certs available. | |
19 proc = subprocess.Popen(['security','find-identity','-p', 'codesigning', | |
20 '-v'], stdout=subprocess.PIPE) | |
21 return "0 valid identities found" not in proc.communicate()[0].strip() | |
22 | |
23 if sys.platform == "darwin": | |
24 test = TestGyp.TestGyp(formats=['xcode', 'ninja']) | |
25 test.run_gyp('xctests.gyp') | |
26 test.build('xctests.gyp', test.ALL) | |
27 test.built_file_must_exist('app_under_test.app/app_under_test') | |
28 test.built_file_must_exist('app_tests.xctest/app_tests') | |
29 if test.format == 'xcode' and HasCerts(): | |
justincohen
2015/10/27 19:38:49
Don't you need to remove Default-iphoneos if there
baxley
2015/11/04 22:10:40
xctest.gyp sets SDKROOT to iphoneos when GENERATOR
| |
30 test.built_file_must_exist('../../xctests.xcodeproj') | |
31 elif test.format == 'ninja': | |
32 test.built_file_must_exist('obj/AppTests/app_tests.AppTests.i386.o') | |
33 test.built_file_must_exist('obj/AppTests/app_tests.AppTests.x86_64.o') | |
34 test.pass_test() | |
OLD | NEW |