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

Unified Diff: test/ios/gyptest-swift.py

Issue 1160773005: Support for Swift language and Clang modules for ninja generator. Base URL: https://chromium.googlesource.com/external/gyp@master
Patch Set: Fixed rare build failure when compiling with modules for multiple archs Created 5 years, 4 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 | « pylib/gyp/xcode_emulation.py ('k') | test/ios/gyptest-swift-wmo.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/ios/gyptest-swift.py
diff --git a/test/ios/gyptest-swift.py b/test/ios/gyptest-swift.py
new file mode 100644
index 0000000000000000000000000000000000000000..16b084e303d3672a6921cc66b6b61f5b41068aee
--- /dev/null
+++ b/test/ios/gyptest-swift.py
@@ -0,0 +1,40 @@
+#!/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 a swift targets build correctly.
+"""
+
+import TestGyp
+import TestMac
+
+import collections
+import sys
+
+if sys.platform == 'darwin':
+ test = TestGyp.TestGyp(formats=['ninja', 'xcode'])
+
+ test_cases = []
+
+ # Run this for iOS on XCode 7.0 or greater
+ if TestMac.Xcode.Version() >= '0600':
+ test_cases = [('Default', 'iphonesimulator'), ('Default', 'iphoneos')]
+
+ chdir = 'swift'
+
+ test.run_gyp('test.gyp', chdir=chdir)
+
+ for configuration, sdk in test_cases:
+ kwds = collections.defaultdict(list)
+ if test.format == 'xcode':
+ kwds['arguments'].extend(['-sdk', sdk])
+ if test.format == 'ninja':
+ configuration = configuration + '-' + sdk
+
+ test.set_configuration(configuration)
+ test.build('test.gyp', test.ALL, chdir=chdir, **kwds)
+
+ test.pass_test()
« no previous file with comments | « pylib/gyp/xcode_emulation.py ('k') | test/ios/gyptest-swift-wmo.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698