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

Unified 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: Update copyright Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/ios/xctests/AppTests/Info.plist ('k') | test/ios/xctests/xctests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..42610d1fc6e42a8f07ad315afbc1d527b86a69ae
--- /dev/null
+++ b/test/ios/xctests/gyptest-xctests.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+
+# Copyright 2015 The Chromium Authors. 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 os
+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)
+ 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 'ninja' in test.format:
+ 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')
+ elif test.format == 'xcode':
+ xcode_object_path = os.path.join('..', 'xctests.build',
+ 'Default-iphonesimulator',
+ 'app_tests.build', 'Objects-normal',
+ '%s', 'AppTests.o')
+ test.built_file_must_exist(xcode_object_path % 'i386')
+ test.built_file_must_exist(xcode_object_path % 'x86_64')
+ test.pass_test()
« no previous file with comments | « test/ios/xctests/AppTests/Info.plist ('k') | test/ios/xctests/xctests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698