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

Side by Side Diff: base/test/gtest_xml_unittest_result_printer.h

Issue 2846673004: Set limit for number of failed EXPECTs per test in test launcher output. (Closed)
Patch Set: Move --test-launcher-test-part-limit switch handling to printer. Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/test/gtest_xml_unittest_result_printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_TEST_GTEST_XML_UNITTEST_RESULT_PRINTER_H_ 5 #ifndef BASE_TEST_GTEST_XML_UNITTEST_RESULT_PRINTER_H_
6 #define BASE_TEST_GTEST_XML_UNITTEST_RESULT_PRINTER_H_ 6 #define BASE_TEST_GTEST_XML_UNITTEST_RESULT_PRINTER_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 28 matching lines...) Expand all
39 void OnTestCaseEnd(const testing::TestCase& test_case) override; 39 void OnTestCaseEnd(const testing::TestCase& test_case) override;
40 40
41 void WriteTestPartResult(const char* file, 41 void WriteTestPartResult(const char* file,
42 int line, 42 int line,
43 testing::TestPartResult::Type type, 43 testing::TestPartResult::Type type,
44 const std::string& summary, 44 const std::string& summary,
45 const std::string& message); 45 const std::string& message);
46 46
47 FILE* output_file_; 47 FILE* output_file_;
48 48
49 // Some tests may contain broken EXPECT with a large message inside a loop
50 // with several thousands iterations and produce huge output (several
51 // gigabytes). Limit number of serialized test result parts to prevent it.
52 // Zero value disables test part results.
53 // Negative value disables limit.
54 int test_part_results_limit_;
Paweł Hajdan Jr. 2017/05/08 17:38:03 Is it worth to add a member variable just for this
alex-ac 2017/05/12 12:07:44 Done.
55
49 DISALLOW_COPY_AND_ASSIGN(XmlUnitTestResultPrinter); 56 DISALLOW_COPY_AND_ASSIGN(XmlUnitTestResultPrinter);
50 }; 57 };
51 58
52 } // namespace base 59 } // namespace base
53 60
54 #endif // BASE_TEST_GTEST_XML_UNITTEST_RESULT_PRINTER_H_ 61 #endif // BASE_TEST_GTEST_XML_UNITTEST_RESULT_PRINTER_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/gtest_xml_unittest_result_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698