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

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: Fix xcodebuild Created 5 years, 2 months 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..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()
« 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