File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -186,8 +186,10 @@ kIsAndroid = 'ANDROID_DATA' in os.environ
186
186
187
187
# Choose between lit's internal shell pipeline runner and a real shell. If
188
188
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
189
- use_lit_shell = os .environ .get ('LIT_USE_INTERNAL_SHELL' , kIsWindows )
189
+ use_lit_shell = os .environ .get ('LIT_USE_INTERNAL_SHELL' , kIsWindows or lit_config . update_tests )
190
190
if not use_lit_shell :
191
+ if lit_config .update_tests :
192
+ lit_config .fatal ('--update-tests cannot be combined with LIT_USE_INTERNAL_SHELL=0' )
191
193
config .available_features .add ('shell' )
192
194
193
195
config .test_format = swift_test .SwiftTest (coverage_mode = config .coverage_mode ,
Original file line number Diff line number Diff line change @@ -160,6 +160,9 @@ def main():
160
160
parser .add_argument ("--unified" , action = "store_true" ,
161
161
help = "The build directory is an unified LLVM build, "
162
162
"not a standalone Swift build" )
163
+ parser .add_argument ("--update-tests" , action = "store_true" ,
164
+ help = "Invoke lit with --update-tests to auto-repair failing tests "
165
+ "(when possible)" )
163
166
164
167
args = parser .parse_args ()
165
168
@@ -280,6 +283,9 @@ def main():
280
283
if args .filter :
281
284
test_args += ['--filter' , args .filter ]
282
285
286
+ if args .update_tests :
287
+ test_args .append ('--update-tests' )
288
+
283
289
test_cmd = [sys .executable , args .lit ] + test_args + paths
284
290
285
291
# Do execute test
You can’t perform that action at this time.
0 commit comments