Summary:
Since background-index can perform disk writes, we don't want to turn
it on tests that won't clear it.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64990
llvm-svn: 366575
InputStyle = JSONStreamStyle::Delimited;
LogLevel = Logger::Verbose;
PrettyPrint = true;
+ // Disable background index on lit tests by default to prevent disk writes.
+ if (!EnableBackgroundIndex.getNumOccurrences())
+ EnableBackgroundIndex = false;
// Ensure background index makes progress.
- BackgroundQueue::preventThreadStarvationInTests();
+ else if (EnableBackgroundIndex)
+ BackgroundQueue::preventThreadStarvationInTests();
}
if (Test || EnableTestScheme) {
static URISchemeRegistry::Add<TestScheme> X(