@@ -10,14 +10,12 @@ class TestSwiftMacCatalyst(TestBase):
10
10
11
11
mydir = TestBase .compute_mydir (__file__ )
12
12
13
- # There's a bug that prevents the maccatalyst SDK overlays from being built.
14
- @expectedFailureAll (bugnumber = 'rdar://problem/62658576' )
15
13
@swiftTest
16
14
@skipIf (macos_version = ["<" , "10.15" ])
17
15
@skipUnlessDarwin
18
16
@skipIfDarwinEmbedded
19
17
def test_macCatalyst (self ):
20
- """Test the x86_64 -apple-ios-macabi target.
18
+ """Test the ${arch} -apple-ios-macabi target.
21
19
Note that this test only works when build-script
22
20
is being invoked with --maccatalyst!
23
21
"""
@@ -29,22 +27,22 @@ def test_macCatalyst(self):
29
27
lldbutil .run_to_source_breakpoint (self , "break here" ,
30
28
lldb .SBFileSpec ('main.swift' ))
31
29
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" ] )
37
35
expr_log = self .getBuildArtifact ("expr.log" )
38
36
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" ] )
40
38
import io
41
39
expr_logfile = io .open (expr_log , "r" , encoding = 'utf-8' )
42
40
43
41
import re
44
42
availability_re = re .compile (r'@available\(macCatalyst 1.*, \*\)' )
45
43
found = False
46
44
for line in expr_logfile :
47
- print (line )
45
+ self . trace (line )
48
46
if availability_re .search (line ):
49
47
found = True
50
48
break
@@ -58,9 +56,10 @@ def test_macCatalyst(self):
58
56
if 'Using prebuilt Swift module cache path: ' in line :
59
57
self .assertTrue (line .endswith ('/macosx/prebuilt-modules\n ' ),
60
58
'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 )
64
63
found_sdk = True
65
64
self .assertTrue (found_prebuilt , 'prebuilt cache path log entry not found' )
66
65
self .assertTrue (found_sdk , 'SDK path log entry not found' )
0 commit comments