Skip to content

Commit

Permalink
Add extra output to diagnose file creation failure
Browse files Browse the repository at this point in the history
printer->Initialize(output_path) sometimes fails and we don't know why
so step one is to print some extra information when it fails.

Bug: 834736
Change-Id: I65bda362d38c0899542da9234e0b47ef57d1aa56
Reviewed-on: https://chromium-review.googlesource.com/1121252
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573038}
  • Loading branch information
randomascii authored and Commit Bot committed Jul 6, 2018
1 parent d1691b3 commit 66cce10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/test/test_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ void TestSuite::AddTestLauncherResultPrinter() {
}

printer_ = new XmlUnitTestResultPrinter;
CHECK(printer_->Initialize(output_path));
CHECK(printer_->Initialize(output_path))
<< "Output path is " << output_path.AsUTF8Unsafe()
<< " and PathExists(output_path) is " << PathExists(output_path);
testing::TestEventListeners& listeners =
testing::UnitTest::GetInstance()->listeners();
listeners.Append(printer_);
Expand Down

0 comments on commit 66cce10

Please sign in to comment.