Chromium Code Reviews| Index: base/test/launcher/test_launcher.cc |
| diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc |
| index 1e2a95b0daa7a6813d8a844d7a46885a2ded8a03..54d7e59798b3723885a368fc7a37fb39fac84abf 100644 |
| --- a/base/test/launcher/test_launcher.cc |
| +++ b/base/test/launcher/test_launcher.cc |
| @@ -974,11 +974,14 @@ void TestLauncher::RunTests() { |
| // Count tests in the binary, before we apply filter and sharding. |
| test_found_count_++; |
| + std::string normlized_test_name = NormalizeTestName(test_name); |
|
Paweł Hajdan Jr.
2016/10/25 18:16:59
nit: normlized -> normalized (typo)
stgao
2016/10/25 19:16:49
Done.
|
| + |
| // Skip the test that doesn't match the filter (if given). |
| if (!positive_test_filter_.empty()) { |
| bool found = false; |
| for (size_t k = 0; k < positive_test_filter_.size(); ++k) { |
| - if (MatchPattern(test_name, positive_test_filter_[k])) { |
| + if (MatchPattern(test_name, positive_test_filter_[k]) || |
| + MatchPattern(normlized_test_name, positive_test_filter_[k])) { |
| found = true; |
| break; |
| } |
| @@ -987,15 +990,19 @@ void TestLauncher::RunTests() { |
| if (!found) |
| continue; |
| } |
| - bool excluded = false; |
| - for (size_t k = 0; k < negative_test_filter_.size(); ++k) { |
| - if (MatchPattern(test_name, negative_test_filter_[k])) { |
| - excluded = true; |
| - break; |
| + if (!negative_test_filter_.empty()) { |
| + bool excluded = false; |
| + for (size_t k = 0; k < negative_test_filter_.size(); ++k) { |
| + if (MatchPattern(test_name, negative_test_filter_[k]) || |
| + MatchPattern(normlized_test_name, negative_test_filter_[k])) { |
| + excluded = true; |
| + break; |
| + } |
| } |
| + |
| + if (excluded) |
| + continue; |
| } |
| - if (excluded) |
| - continue; |
| if (Hash(test_name) % total_shards_ != static_cast<uint32_t>(shard_index_)) |
| continue; |