chromium/testing/perf/luci_test_result.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "testing/perf/luci_test_result.h"

#include <utility>

#include "base/check.h"
#include "base/files/file_util.h"
#include "base/i18n/time_formatting.h"
#include "base/json/json_writer.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace perf_test {

namespace {

constexpr char kKeyFilePath[] =;
constexpr char kKeyContents[] =;
constexpr char kKeyContentType[] =;
constexpr char kKeyTestResult[] =;
constexpr char kKeyTestPath[] =;
constexpr char kKeyVariant[] =;
constexpr char kKeyStatus[] =;
constexpr char kKeyExpected[] =;
constexpr char kKeyStartTime[] =;
constexpr char kKeyRunDuration[] =;
constexpr char kKeyOutputArtifacts[] =;
constexpr char kKeyTags[] =;
constexpr char kKeyKey[] =;
constexpr char kKeyValue[] =;

std::string ToString(LuciTestResult::Status status) {}

base::Value ToValue(const LuciTestResult::Artifact& artifact) {}

base::Value ToValue(const LuciTestResult& result) {}

std::string ToJson(const LuciTestResult& result) {}

}  // namespace

///////////////////////////////////////////////////////////////////////////////
// LuciTestResult::Artifact

LuciTestResult::Artifact::Artifact() = default;
LuciTestResult::Artifact::Artifact(const Artifact& other) = default;
LuciTestResult::Artifact::Artifact(const base::FilePath file_path,
                                   const std::string& content_type)
    :{}
LuciTestResult::Artifact::Artifact(const std::string& contents,
                                   const std::string& content_type)
    :{}
LuciTestResult::Artifact::~Artifact() = default;

///////////////////////////////////////////////////////////////////////////////
// LuciTestResult

LuciTestResult::LuciTestResult() = default;
LuciTestResult::LuciTestResult(const LuciTestResult& other) = default;
LuciTestResult::LuciTestResult(LuciTestResult&& other) = default;
LuciTestResult::~LuciTestResult() = default;

// static
LuciTestResult LuciTestResult::CreateForGTest() {}

void LuciTestResult::AddVariant(const std::string& key,
                                const std::string& value) {}

void LuciTestResult::AddOutputArtifactFile(const std::string& artifact_name,
                                           const base::FilePath& file_path,
                                           const std::string& content_type) {}

void LuciTestResult::AddOutputArtifactContents(
    const std::string& artifact_name,
    const std::string& contents,
    const std::string& content_type) {}

void LuciTestResult::AddTag(const std::string& key, const std::string& value) {}

void LuciTestResult::WriteToFile(const base::FilePath& result_file) const {}

}  // namespace perf_test