#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "base/test/launcher/test_results_tracker.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include "base/base64.h"
#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/format_macros.h"
#include "base/i18n/time_formatting.h"
#include "base/json/json_writer.h"
#include "base/json/string_escape.h"
#include "base/logging.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/gtest_util.h"
#include "base/test/launcher/test_launcher.h"
#include "base/test/test_switches.h"
#include "base/time/time.h"
#include "base/values.h"
#include "build/build_config.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
namespace base {
namespace {
const FilePath::CharType kDefaultOutputFile[] = …);
std::string FormatTimeAsIso8601(Time time) { … }
struct TestSuiteResultsAggregator { … };
}
TestResultsTracker::TestResultsTracker() : … { … }
TestResultsTracker::~TestResultsTracker() { … }
bool TestResultsTracker::Init(const CommandLine& command_line) { … }
void TestResultsTracker::OnTestIterationStarting() { … }
void TestResultsTracker::AddTest(const std::string& test_name) { … }
void TestResultsTracker::AddDisabledTest(const std::string& test_name) { … }
void TestResultsTracker::AddTestLocation(const std::string& test_name,
const std::string& file,
int line) { … }
void TestResultsTracker::AddTestPlaceholder(const std::string& test_name) { … }
void TestResultsTracker::AddTestResult(const TestResult& result) { … }
void TestResultsTracker::AddLeakedItems(
int count,
const std::vector<std::string>& test_names) { … }
void TestResultsTracker::GeneratePlaceholderIteration() { … }
void TestResultsTracker::PrintSummaryOfCurrentIteration() const { … }
void TestResultsTracker::PrintSummaryOfAllIterations() const { … }
void TestResultsTracker::AddGlobalTag(const std::string& tag) { … }
bool TestResultsTracker::SaveSummaryAsJSON(
const FilePath& path,
const std::vector<std::string>& additional_tags) const { … }
TestResultsTracker::TestStatusMap
TestResultsTracker::GetTestStatusMapForCurrentIteration() const { … }
TestResultsTracker::TestStatusMap
TestResultsTracker::GetTestStatusMapForAllIterations() const { … }
void TestResultsTracker::GetTestStatusForIteration(
int iteration, TestStatusMap* map) const { … }
template<typename InputIterator>
void TestResultsTracker::PrintTests(InputIterator first,
InputIterator last,
const std::string& description) const { … }
void TestResultsTracker::PrintLeaks(
int count,
const std::vector<std::string>& test_names) const { … }
TestResultsTracker::AggregateTestResult::AggregateTestResult() = default;
TestResultsTracker::AggregateTestResult::AggregateTestResult(
const AggregateTestResult& other) = default;
TestResultsTracker::AggregateTestResult::~AggregateTestResult() = default;
TestResultsTracker::PerIterationData::PerIterationData() = default;
TestResultsTracker::PerIterationData::PerIterationData(
const PerIterationData& other) = default;
TestResultsTracker::PerIterationData::~PerIterationData() = default;
}