OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 |
| 3 # Copyright (c) 2015 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 7 """ |
| 8 Verifies that a swift framework builds correctly. |
| 9 """ |
| 10 |
| 11 import TestGyp |
| 12 |
| 13 import collections |
| 14 import sys |
| 15 |
| 16 if sys.platform == 'darwin': |
| 17 test = TestGyp.TestGyp(formats=['ninja', 'xcode']) |
| 18 |
| 19 test_cases = [('Default', 'iphonesimulator'), ('Default', 'iphoneos')] |
| 20 |
| 21 test.run_gyp('test.gyp', chdir='swift') |
| 22 |
| 23 for configuration, sdk in test_cases: |
| 24 kwds = collections.defaultdict(list) |
| 25 if test.format == 'xcode': |
| 26 kwds['arguments'].extend(['-sdk', sdk]) |
| 27 if test.format == 'ninja': |
| 28 configuration = configuration + '-' + sdk |
| 29 |
| 30 test.set_configuration(configuration) |
| 31 test.build('test.gyp', test.ALL, chdir='swift', **kwds) |
| 32 |
| 33 test.pass_test() |
OLD | NEW |