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..2fa945ca6a6a10d5b653d1ee41d0427c1d13d625 |
--- /dev/null |
+++ b/test/ios/xctests/gyptest-xctests.py |
@@ -0,0 +1,34 @@ |
+#!/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.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' 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
|
+ test.built_file_must_exist('../../xctests.xcodeproj') |
+ 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') |
+ test.pass_test() |