[clangd] Disable background-index on lit-tests by default
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
This commit is contained in:
parent
5905aae169
commit
9dc0160d26
|
@ -355,7 +355,11 @@ int main(int argc, char *argv[]) {
|
|||
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.
|
||||
else if (EnableBackgroundIndex)
|
||||
BackgroundQueue::preventThreadStarvationInTests();
|
||||
}
|
||||
if (Test || EnableTestScheme) {
|
||||
|
|
Loading…
Reference in New Issue