OLD | NEW |
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_results_tracker.h" | 5 #include "base/test/launcher/test_results_tracker.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 FilePath::StringType(FILE_PATH_LITERAL("xml")))); | 123 FilePath::StringType(FILE_PATH_LITERAL("xml")))); |
124 } | 124 } |
125 } | 125 } |
126 if (path.value().empty()) | 126 if (path.value().empty()) |
127 path = FilePath(kDefaultOutputFile); | 127 path = FilePath(kDefaultOutputFile); |
128 FilePath dir_name = path.DirName(); | 128 FilePath dir_name = path.DirName(); |
129 if (!DirectoryExists(dir_name)) { | 129 if (!DirectoryExists(dir_name)) { |
130 LOG(WARNING) << "The output directory does not exist. " | 130 LOG(WARNING) << "The output directory does not exist. " |
131 << "Creating the directory: " << dir_name.value(); | 131 << "Creating the directory: " << dir_name.value(); |
132 // Create the directory if necessary (because the gtest does the same). | 132 // Create the directory if necessary (because the gtest does the same). |
133 if (!file_util::CreateDirectory(dir_name)) { | 133 if (!base::CreateDirectory(dir_name)) { |
134 LOG(ERROR) << "Failed to created directory " << dir_name.value(); | 134 LOG(ERROR) << "Failed to created directory " << dir_name.value(); |
135 return false; | 135 return false; |
136 } | 136 } |
137 } | 137 } |
138 out_ = file_util::OpenFile(path, "w"); | 138 out_ = file_util::OpenFile(path, "w"); |
139 if (!out_) { | 139 if (!out_) { |
140 LOG(ERROR) << "Cannot open output file: " | 140 LOG(ERROR) << "Cannot open output file: " |
141 << path.value() << "."; | 141 << path.value() << "."; |
142 return false; | 142 return false; |
143 } | 143 } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 TestResultsTracker::AggregateTestResult::~AggregateTestResult() { | 289 TestResultsTracker::AggregateTestResult::~AggregateTestResult() { |
290 } | 290 } |
291 | 291 |
292 TestResultsTracker::PerIterationData::PerIterationData() { | 292 TestResultsTracker::PerIterationData::PerIterationData() { |
293 } | 293 } |
294 | 294 |
295 TestResultsTracker::PerIterationData::~PerIterationData() { | 295 TestResultsTracker::PerIterationData::~PerIterationData() { |
296 } | 296 } |
297 | 297 |
298 } // namespace base | 298 } // namespace base |
OLD | NEW |