Commit 46c2653d authored by Ramin Halavati's avatar Ramin Halavati Committed by Commit Bot

Add more strict filter for tests to traffic annotation auditor.

Traffic annotation auditor file filter is expanded to ignore all files
that end with test.cc or test.mm.

Bug: 690323
Change-Id: Iac0eb5aca403f4fa40b6b81dd85a46c317fd6684
Reviewed-on: https://chromium-review.googlesource.com/924062
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537585}
parent cbe9c5b9
...@@ -99,4 +99,4 @@ and cc the people listed in OWNERS; they'll be on the hook to rebuild and ...@@ -99,4 +99,4 @@ and cc the people listed in OWNERS; they'll be on the hook to rebuild and
re-enable the test. re-enable the test.
CLANG_REVISION = '324578' CLANG_REVISION = '324578'
LASTCHANGE=64559eae06975e9574e0967a27c795a1d2bdaf00-refs/heads/master@{#537260} LASTCHANGE=03c55b230fda790e170ae999c1b95b92aa3ea752-refs/heads/master@{#537293}
...@@ -95,11 +95,11 @@ bool TrafficAnnotationFileFilter::IsFileRelevant(const std::string& file_path) { ...@@ -95,11 +95,11 @@ bool TrafficAnnotationFileFilter::IsFileRelevant(const std::string& file_path) {
return false; return false;
} }
// Ignore unittest files to speed up the tests. They would be only tested when // Ignore test files to speed up the tests. They would be only tested when
// filters are disabled. // filters are disabled.
pos = file_path.length() - 12; pos = file_path.length() - 7;
if (pos >= 0 && (!strcmp("_unittest.cc", file_path.c_str() + pos) || if (pos >= 0 && (!strcmp("test.cc", file_path.c_str() + pos) ||
!strcmp("_unittest.mm", file_path.c_str() + pos))) { !strcmp("test.mm", file_path.c_str() + pos))) {
return false; return false;
} }
......
500300a202b198c6ba2c6351b05ef6a1afc6b394 cd19399e551a9b5d634db387fd2285cdb57c4a94
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment