Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: test/ios/xctests/gyptest-xctests.py

Issue 1410113002: Make ninja work with XCTests for iOS. (Closed) Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: make work without certs Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_configs = ['Default']
27 # TODO(crbug.com/557418): Enable this once xcodebuild works for iOS devices.
28 #if HasCerts() and test.format == 'xcode':
29 # test_configs.append('Default-iphoneos')
30 for config in test_configs:
31 test.set_configuration(config)
32 if config == 'Default-iphoneos':
33 p = test.built_file_path('app_under_test.app/app_under_test')
justincohen 2015/11/19 18:37:36 What is this for?
baxley 2015/11/19 21:20:54 Shouldn't be there, removed.
34 test.build('xctests.gyp', test.ALL)
35 test.built_file_must_exist('app_under_test.app/app_under_test')
36 test.built_file_must_exist('app_tests.xctest/app_tests')
37 if test.format == 'xcode':
38 test.built_file_must_exist('../../xctests.xcodeproj')
justincohen 2015/11/19 18:37:36 Not sure what the value of checking this is for an
baxley 2015/11/19 21:20:54 Probably not needed, removed.
39 elif test.format == 'ninja':
40 test.built_file_must_exist('obj/AppTests/app_tests.AppTests.i386.o')
41 test.built_file_must_exist('obj/AppTests/app_tests.AppTests.x86_64.o')
baxley 2015/11/19 21:20:54 Is there value in checking for the .o files to mak
justincohen 2015/11/20 16:14:51 I think there is. There's always the chance somet
baxley 2015/11/20 21:33:47 Okay, I added some code to look for the xcodebuild
42 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698