| 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..552f6330a7303b661b26533de498975cfb5e0bd7
|
| --- /dev/null
|
| +++ b/test/ios/gyptest-swift.py
|
| @@ -0,0 +1,33 @@
|
| +#!/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 framework builds correctly.
|
| +"""
|
| +
|
| +import TestGyp
|
| +
|
| +import collections
|
| +import sys
|
| +
|
| +if sys.platform == 'darwin':
|
| + test = TestGyp.TestGyp(formats=['ninja', 'xcode'])
|
| +
|
| + test_cases = [('Default', 'iphonesimulator'), ('Default', 'iphoneos')]
|
| +
|
| + test.run_gyp('test.gyp', chdir='swift')
|
| +
|
| + 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='swift', **kwds)
|
| +
|
| + test.pass_test()
|
|
|