Skip to content

Commit 78d6507

Browse files
Merge pull request #6794 from adrian-prantl/test-update
Enable and fix macCatalyst test
2 parents d20d8db + d7bd8d9 commit 78d6507

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SWIFT_SOURCES := main.swift
22

3-
SWIFTFLAGS_EXTRAS := -target $(ARCH)-apple-ios13.0-macabi
3+
SWIFTFLAGS_EXTRAS := -target $(ARCH)-apple-ios14-macabi
44

55
include Makefile.rules

lldb/test/API/lang/swift/macCatalyst/TestSwiftMacCatalyst.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ class TestSwiftMacCatalyst(TestBase):
1010

1111
mydir = TestBase.compute_mydir(__file__)
1212

13-
# There's a bug that prevents the maccatalyst SDK overlays from being built.
14-
@expectedFailureAll(bugnumber='rdar://problem/62658576')
1513
@swiftTest
1614
@skipIf(macos_version=["<", "10.15"])
1715
@skipUnlessDarwin
1816
@skipIfDarwinEmbedded
1917
def test_macCatalyst(self):
20-
"""Test the x86_64-apple-ios-macabi target.
18+
"""Test the ${arch}-apple-ios-macabi target.
2119
Note that this test only works when build-script
2220
is being invoked with --maccatalyst!
2321
"""
@@ -29,22 +27,22 @@ def test_macCatalyst(self):
2927
lldbutil.run_to_source_breakpoint(self, "break here",
3028
lldb.SBFileSpec('main.swift'))
3129
self.expect("image list -t -b",
32-
patterns=["x86_64-apple-ios13.0.0-macabi a\.out",
33-
"x86_64.*-apple-ios.*-macabi Foundation",
34-
"x86_64.*-apple-.* libswiftCore",
35-
"x86_64.*-apple-macosx.* libcompiler_rt.dylib"])
36-
self.expect("fr v s", "Hello macCatalyst")
30+
patterns=["-apple-ios14.0.0-macabi a\.out",
31+
"-apple-ios.*-macabi Foundation",
32+
"-apple-.* libswiftCore",
33+
"-apple-macosx.* libcompiler_rt.dylib"])
34+
self.expect("fr v s", substrs=["Hello macCatalyst"])
3735
expr_log = self.getBuildArtifact("expr.log")
3836
self.expect('log enable lldb expr -f "%s"' % expr_log)
39-
self.expect("expression s", "Hello macCatalyst")
37+
self.expect("expression s", substrs=["Hello macCatalyst"])
4038
import io
4139
expr_logfile = io.open(expr_log, "r", encoding='utf-8')
4240

4341
import re
4442
availability_re = re.compile(r'@available\(macCatalyst 1.*, \*\)')
4543
found = False
4644
for line in expr_logfile:
47-
print(line)
45+
self.trace(line)
4846
if availability_re.search(line):
4947
found = True
5048
break
@@ -58,9 +56,10 @@ def test_macCatalyst(self):
5856
if 'Using prebuilt Swift module cache path: ' in line:
5957
self.assertTrue(line.endswith('/macosx/prebuilt-modules\n'),
6058
'unexpected prebuilt cache path: ' + line)
61-
found = True
62-
if 'SDK path' in line:
63-
self.assertTrue('SDKs/MacOSX' in line, 'picked non-macOS SDK:' + line)
59+
found_prebuilt = True
60+
if 'SDK path ' in line:
61+
self.assertTrue('SDKs/MacOSX' in line,
62+
'picked non-macOS SDK:' + line)
6463
found_sdk = True
6564
self.assertTrue(found_prebuilt, 'prebuilt cache path log entry not found')
6665
self.assertTrue(found_sdk, 'SDK path log entry not found')
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
func use<T>(_ t: T) {}
22

33
import Foundation
4-
let s = NSString(string: "Hello MacABI")
4+
let s = NSString(string: "Hello macCatalyst")
55
use(s) // break here

0 commit comments

Comments
 (0)