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 wmo target builds correctly. |
| 9 """ |
| 10 |
| 11 import TestGyp |
| 12 import TestMac |
| 13 |
| 14 import collections |
| 15 import sys |
| 16 |
| 17 if sys.platform == 'darwin': |
| 18 test = TestGyp.TestGyp(formats=['ninja', 'xcode']) |
| 19 |
| 20 test_cases = [] |
| 21 |
| 22 # Run this for iOS on XCode 7.0 or greater |
| 23 if TestMac.Xcode.Version() >= '0700': |
| 24 test_cases = [('Default', 'iphonesimulator'), ('Default', 'iphoneos')] |
| 25 |
| 26 chdir = 'swift-wmo' |
| 27 |
| 28 test.run_gyp('test.gyp', chdir=chdir) |
| 29 |
| 30 for configuration, sdk in test_cases: |
| 31 kwds = collections.defaultdict(list) |
| 32 if test.format == 'xcode': |
| 33 kwds['arguments'].extend(['-sdk', sdk]) |
| 34 if test.format == 'ninja': |
| 35 configuration = configuration + '-' + sdk |
| 36 |
| 37 test.set_configuration(configuration) |
| 38 test.build('test.gyp', test.ALL, chdir=chdir, **kwds) |
| 39 |
| 40 test.pass_test() |
OLD | NEW |