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

Side by Side Diff: base/test/launcher/test_launcher.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
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 #include "base/test/launcher/test_launcher.h" 5 #include "base/test/launcher/test_launcher.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } else if (result.status == TestResult::TEST_TIMEOUT) { 640 } else if (result.status == TestResult::TEST_TIMEOUT) {
641 status_line.append("(TIMED OUT)"); 641 status_line.append("(TIMED OUT)");
642 } else if (result.status == TestResult::TEST_CRASH) { 642 } else if (result.status == TestResult::TEST_CRASH) {
643 status_line.append("(CRASHED)"); 643 status_line.append("(CRASHED)");
644 } else if (result.status == TestResult::TEST_SKIPPED) { 644 } else if (result.status == TestResult::TEST_SKIPPED) {
645 status_line.append("(SKIPPED)"); 645 status_line.append("(SKIPPED)");
646 } else if (result.status == TestResult::TEST_UNKNOWN) { 646 } else if (result.status == TestResult::TEST_UNKNOWN) {
647 status_line.append("(UNKNOWN)"); 647 status_line.append("(UNKNOWN)");
648 } else { 648 } else {
649 // Fail very loudly so it's not ignored. 649 // Fail very loudly so it's not ignored.
650 CHECK(false) << "Unhandled test result status: " << result.status; 650 // Unhandled test result status.
651 CHECK(false);
651 } 652 }
652 fprintf(stdout, "%s\n", status_line.c_str()); 653 fprintf(stdout, "%s\n", status_line.c_str());
653 fflush(stdout); 654 fflush(stdout);
654 655
655 // We just printed a status line, reset the watchdog timer. 656 // We just printed a status line, reset the watchdog timer.
656 watchdog_timer_.Reset(); 657 watchdog_timer_.Reset();
657 658
658 // Do not waste time on timeouts. We include tests with unknown results here 659 // Do not waste time on timeouts. We include tests with unknown results here
659 // because sometimes (e.g. hang in between unit tests) that's how a timeout 660 // because sometimes (e.g. hang in between unit tests) that's how a timeout
660 // gets reported. 661 // gets reported.
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 } 1206 }
1206 1207
1207 std::string snippet(full_output.substr(run_pos)); 1208 std::string snippet(full_output.substr(run_pos));
1208 if (end_pos != std::string::npos) 1209 if (end_pos != std::string::npos)
1209 snippet = full_output.substr(run_pos, end_pos - run_pos); 1210 snippet = full_output.substr(run_pos, end_pos - run_pos);
1210 1211
1211 return snippet; 1212 return snippet;
1212 } 1213 }
1213 1214
1214 } // namespace base 1215 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698