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
186186
187187# Choose between lit's internal shell pipeline runner and a real shell. If
188188# 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 )
190190if 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' )
191193 config .available_features .add ('shell' )
192194
193195config .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():
160160 parser .add_argument ("--unified" , action = "store_true" ,
161161 help = "The build directory is an unified LLVM build, "
162162 "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)" )
163166
164167 args = parser .parse_args ()
165168
@@ -280,6 +283,9 @@ def main():
280283 if args .filter :
281284 test_args += ['--filter' , args .filter ]
282285
286+ if args .update_tests :
287+ test_args .append ('--update-tests' )
288+
283289 test_cmd = [sys .executable , args .lit ] + test_args + paths
284290
285291 # Do execute test
You can’t perform that action at this time.
0 commit comments