Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(930)

Unified Diff: base/test/gtest_util.cc

Issue 2439423003: test launcher: make --gtest_filter=A.B + --gtest_also_run_disabled_tests also run A.DISABLED_B or D… (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/test/gtest_util.cc
diff --git a/base/test/gtest_util.cc b/base/test/gtest_util.cc
index 5432c4ac112d60237d477bb38da13a3bc2a9a78a..4352ab90e232f2baf93e2a9c66944fd3168ed7a2 100644
--- a/base/test/gtest_util.cc
+++ b/base/test/gtest_util.cc
@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "base/json/json_file_value_serializer.h"
+#include "base/strings/string_util.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -25,6 +26,12 @@ std::string FormatFullTestName(const std::string& test_case_name,
return test_case_name + "." + test_name;
}
+std::string NormalizeTestName(const std::string& full_test_name) {
+ std::string test_name_no_disabled(full_test_name);
+ ReplaceSubstringsAfterOffset(&test_name_no_disabled, 0, "DISABLED_", "");
stgao 2016/10/24 21:48:23 For test A.B, if A or B matches either "DISABLED_*
Paweł Hajdan Jr. 2016/10/25 18:16:59 The code is fine. It matches existing implementati
stgao 2016/10/25 19:16:49 Acknowledged.
+ return test_name_no_disabled;
+}
+
std::vector<TestIdentifier> GetCompiledInTests() {
testing::UnitTest* const unit_test = testing::UnitTest::GetInstance();

Powered by Google App Engine
This is Rietveld 408576698