Clang: Watch only PCH sources

We watched all sources but we do not want to watch the sources of the
project part because they are not used to build a PCH.

Change-Id: I700cd6077fc54230c9be94d620043cf3f10cf9ea
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2019-06-18 18:26:27 +02:00
parent cbfd9dc16b
commit e031ada154
13 changed files with 49 additions and 37 deletions

View File

@@ -70,7 +70,7 @@ protected:
MockSqliteWriteStatement &updatePchCreationTimeStampStatement = storage.updatePchCreationTimeStampStatement;
MockSqliteWriteStatement &deleteAllProjectPartsFilesWithProjectPartNameStatement
= storage.deleteAllProjectPartsFilesWithProjectPartNameStatement;
MockSqliteReadStatement &fetchProjectPartsFilesStatement = storage.fetchProjectPartsFilesStatement;
MockSqliteReadStatement &fetchProjectPartsFilesStatement = storage.fetchPchSourcesStatement;
};
TEST_F(BuildDependenciesStorage, ConvertStringsToJson)
@@ -238,7 +238,7 @@ TEST_F(BuildDependenciesStorage, FetchSources)
ClangBackEnd::FilePathIds result{3, 5, 7};
EXPECT_CALL(fetchProjectPartsFilesStatement, valuesReturnFilePathIds(_, 22)).WillOnce(Return(result));
auto sources = storage.fetchSources(22);
auto sources = storage.fetchPchSources(22);
ASSERT_THAT(sources, result);
}