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

Unified Diff: base/test/test_suite.h

Issue 2638763004: Report CHECK/DCHECK to test launcher summary output. (Closed)
Patch Set: Add test for assert handlers nesting. 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
« no previous file with comments | « base/test/gtest_xml_unittest_result_printer.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_suite.h
diff --git a/base/test/test_suite.h b/base/test/test_suite.h
index 590a18cb750db37bacbe9896af435ea8fa1815e7..82c746eb3c1b687c78cd859f70f0ee485b1294bf 100644
--- a/base/test/test_suite.h
+++ b/base/test/test_suite.h
@@ -13,6 +13,7 @@
#include <string>
#include "base/at_exit.h"
+#include "base/logging.h"
#include "base/macros.h"
#include "base/test/trace_to_file.h"
#include "build/build_config.h"
@@ -23,6 +24,8 @@ class TestInfo;
namespace base {
+class XmlUnitTestResultPrinter;
+
// Instantiates TestSuite, runs it and returns exit code.
int RunUnitTestsUsingBaseTestSuite(int argc, char **argv);
@@ -54,7 +57,10 @@ class TestSuite {
// By default fatal log messages (e.g. from DCHECKs) result in error dialogs
// which gum up buildbots. Use a minimalistic assert handler which just
// terminates the process.
- static void UnitTestAssertHandler(const std::string& str);
+ void UnitTestAssertHandler(const char* file,
+ int line,
+ const base::StringPiece summary,
+ const base::StringPiece stack_trace);
// Disable crash dialogs so that it doesn't gum up the buildbot
virtual void SuppressErrorDialogs();
@@ -84,6 +90,10 @@ class TestSuite {
bool created_feature_list_;
+ XmlUnitTestResultPrinter* printer_ = nullptr;
+
+ std::unique_ptr<logging::ScopedLogAssertHandler> assert_handler_;
+
DISALLOW_COPY_AND_ASSIGN(TestSuite);
};
« no previous file with comments | « base/test/gtest_xml_unittest_result_printer.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698