If lit was run on a directory that contained no suites,
then naturally suite[0] will not be there,
and that line would cause python warnings.
So just predicate it with a check that it is there in the first place.
# This data is no longer needed but keeping it around causes awful
# performance problems while the test suites run.
for k, suite in test_suite_cache.items():
- suite[0].test_times = None
+ if suite[0]:
+ suite[0].test_times = None
# If there were any errors during test discovery, exit now.
if lit_config.numErrors: