VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 10s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 14s
VoidBuildSystem CI / fuzz-clang (push) Failing after 8s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 7s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 54s
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <Void/Functional/Error.hpp>
|
|
#include <Void/Functional/Result.hpp>
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
namespace Void::Build::Report {
|
|
|
|
// One test result as reported to CDash.
|
|
struct CdashTestResult {
|
|
std::string name;
|
|
bool passed{true};
|
|
double elapsed_seconds{0.0};
|
|
std::string output;
|
|
};
|
|
|
|
struct CdashReportOptions {
|
|
std::string site_name; // <Site Name="...">, usually the machine host name.
|
|
std::string build_name; // CDash build name, e.g. "vbs-debug".
|
|
std::string build_stamp; // CDash build stamp, e.g. "20261205-1015-Experimental".
|
|
std::string os_name;
|
|
std::string generator{"vbs"};
|
|
std::vector<CdashTestResult> tests;
|
|
};
|
|
|
|
// CTest-compatible Test.xml consumed by CDash's submit.php.
|
|
[[nodiscard]] std::string render_cdash_test_xml(const CdashReportOptions &options);
|
|
|
|
struct CdashSubmission {
|
|
std::string content_type;
|
|
std::string body;
|
|
};
|
|
|
|
// multipart/form-data payload for `<cdash>/submit.php?project=<project>`.
|
|
[[nodiscard]] CdashSubmission build_cdash_submission(const CdashReportOptions &options,
|
|
std::string_view project);
|
|
|
|
// Uploads a Test.xml report. `cdash_url` is the CDash base URL (e.g. http://host/cdash).
|
|
[[nodiscard]] Void::Result::Result<void, Void::Result::Error>
|
|
submit_cdash_report(std::string_view cdash_url, std::string_view project,
|
|
const CdashReportOptions &options);
|
|
|
|
} // namespace Void::Build::Report
|