Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ kIsAndroid = 'ANDROID_DATA' in os.environ

# Choose between lit's internal shell pipeline runner and a real shell. If
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
use_lit_shell = os.environ.get('LIT_USE_INTERNAL_SHELL', kIsWindows)
use_lit_shell = os.environ.get('LIT_USE_INTERNAL_SHELL', kIsWindows or lit_config.update_tests)
if not use_lit_shell:
if lit_config.update_tests:
lit_config.fatal('--update-tests cannot be combined with LIT_USE_INTERNAL_SHELL=0')
config.available_features.add('shell')

config.test_format = swift_test.SwiftTest(coverage_mode=config.coverage_mode,
Expand Down
6 changes: 6 additions & 0 deletions utils/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ def main():
parser.add_argument("--unified", action="store_true",
help="The build directory is an unified LLVM build, "
"not a standalone Swift build")
parser.add_argument("--update-tests", action="store_true",
help="Invoke lit with --update-tests to auto-repair failing tests "
"(when possible)")

args = parser.parse_args()

Expand Down Expand Up @@ -280,6 +283,9 @@ def main():
if args.filter:
test_args += ['--filter', args.filter]

if args.update_tests:
test_args.append('--update-tests')

test_cmd = [sys.executable, args.lit] + test_args + paths

# Do execute test
Expand Down