@@ -137,19 +137,20 @@ def launch(self, force_target):
137
137
self .expect ('settings set target.swift-framework-search-paths "%s"' %
138
138
self .getBuildDir ())
139
139
140
- self .options = lldb .SBExpressionOptions ()
141
- self .options .SetLanguage (lldb .eLanguageTypeSwift )
142
- self .options .SetPlaygroundTransformEnabled ()
143
- # The concurrency expressions will spawn multiple threads.
144
- self .options .SetOneThreadTimeoutInMicroSeconds (1 )
145
- self .options .SetTryAllThreads (True )
146
-
147
-
148
140
def execute_code (self , input_file , expect_error = False ):
149
141
contents = "syntax error"
150
142
with open (input_file , 'r' ) as contents_file :
151
143
contents = contents_file .read ()
152
- res = self .frame ().EvaluateExpression (contents , self .options )
144
+
145
+ options = lldb .SBExpressionOptions ()
146
+ options .SetLanguage (lldb .eLanguageTypeSwift )
147
+ options .SetPlaygroundTransformEnabled ()
148
+ # The concurrency expressions will spawn multiple threads.
149
+ options .SetOneThreadTimeoutInMicroSeconds (1 )
150
+ options .SetTryAllThreads (True )
151
+ options .SetAutoApplyFixIts (False )
152
+
153
+ res = self .frame ().EvaluateExpression (contents , options )
153
154
ret = self .frame ().EvaluateExpression ("get_output()" )
154
155
is_error = res .GetError ().Fail () and not (
155
156
res .GetError ().GetType () == 1 and
@@ -198,12 +199,5 @@ def do_import_test(self):
198
199
self .assertIn ("Hello from the Dylib" , playground_output )
199
200
200
201
# Scan through the types log to make sure the SwiftASTContext was poisoned.
201
- import io
202
- logfile = io .open (log , "r" , encoding = 'utf-8' )
203
- found = 0
204
- for line in logfile :
205
- if 'New Swift image added' in line \
206
- and 'Versions/A/Dylib' in line \
207
- and 'ClangImporter needs to be reinitialized' in line :
208
- found += 1
209
- self .assertGreater (found , 1 )
202
+ self .filecheck ('platform shell cat ""%s"' % log , __file__ )
203
+ # CHECK: New Swift image added{{.*}}Versions/A/Dylib{{.*}}ClangImporter needs to be reinitialized
0 commit comments