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

Unified Diff: base/test/test_suite.cc

Issue 2846673004: Set limit for number of failed EXPECTs per test in test launcher output. (Closed)
Patch Set: Created 3 years, 8 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/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index c9bfe9e0f0173558f90130aead0fabe5b8370864..c60d7ef81cc6d0d59d5fa23e5480e1856f58970f 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -239,6 +239,16 @@ void TestSuite::AddTestLauncherResultPrinter() {
}
printer_ = new XmlUnitTestResultPrinter;
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
Paweł Hajdan Jr. 2017/05/05 17:33:03 Can we just move this code to the printer?
alex-ac 2017/05/07 12:07:24 Done.
+ switches::kTestLauncherTestPartResultsLimit)) {
+ std::string limit_str =
+ CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kTestLauncherTestPartResultsLimit);
+ long int limit = std::strtol(limit_str.c_str(), nullptr, 10);
+ printer_->set_test_part_results_limit(limit);
+ }
+
CHECK(printer_->Initialize(output_path));
testing::TestEventListeners& listeners =
testing::UnitTest::GetInstance()->listeners();

Powered by Google App Engine
This is Rietveld 408576698