Chromium Code Reviews| Index: test/ios/xctests/gyptest-xctests.py |
| diff --git a/test/ios/xctests/gyptest-xctests.py b/test/ios/xctests/gyptest-xctests.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5a6fb641ec230fa6c8c0c457d44f7131cf26be21 |
| --- /dev/null |
| +++ b/test/ios/xctests/gyptest-xctests.py |
| @@ -0,0 +1,42 @@ |
| +#!/usr/bin/env python |
| + |
| +# Copyright (c) 2015 Google Inc. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +""" |
| +Verifies that iOS XCTests can be built correctly. |
| +""" |
| + |
| +import TestGyp |
| + |
| +import subprocess |
| +import sys |
| + |
| +def HasCerts(): |
| + # Because the bots do not have certs, don't check them if there are no |
| + # certs available. |
| + proc = subprocess.Popen(['security','find-identity','-p', 'codesigning', |
| + '-v'], stdout=subprocess.PIPE) |
| + return "0 valid identities found" not in proc.communicate()[0].strip() |
| + |
| +if sys.platform == "darwin": |
| + test = TestGyp.TestGyp(formats=['xcode', 'ninja']) |
| + test.run_gyp('xctests.gyp') |
| + test_configs = ['Default'] |
| + # TODO(crbug.com/557418): Enable this once xcodebuild works for iOS devices. |
| + #if HasCerts() and test.format == 'xcode': |
| + # test_configs.append('Default-iphoneos') |
| + for config in test_configs: |
| + test.set_configuration(config) |
| + if config == 'Default-iphoneos': |
| + 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.
|
| + test.build('xctests.gyp', test.ALL) |
| + test.built_file_must_exist('app_under_test.app/app_under_test') |
| + test.built_file_must_exist('app_tests.xctest/app_tests') |
| + if test.format == 'xcode': |
| + 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.
|
| + elif test.format == 'ninja': |
| + test.built_file_must_exist('obj/AppTests/app_tests.AppTests.i386.o') |
| + 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
|
| + test.pass_test() |