From b1ccb71a4bdbacd44843abfa9497576016962ed8 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 17 Mar 2025 14:31:58 +0100 Subject: execution_api: support reading off stdout/stderr digests --- src/buildtool/execution_api/local/local_response.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/buildtool/execution_api/local/local_response.hpp') diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp index 5c0dcd0a..852284b7 100644 --- a/src/buildtool/execution_api/local/local_response.hpp +++ b/src/buildtool/execution_api/local/local_response.hpp @@ -72,6 +72,24 @@ class LocalResponse final : public IExecutionResponse { Logger::Log(LogLevel::Debug, "reading stdout failed"); return {}; } + auto StdErrDigest() noexcept -> std::optional final { + auto digest = ArtifactDigestFactory::FromBazel( + storage_.GetHashFunction().GetType(), + output_.action.stderr_digest()); + if (digest) { + return *digest; + } + return std::nullopt; + } + auto StdOutDigest() noexcept -> std::optional final { + auto digest = ArtifactDigestFactory::FromBazel( + storage_.GetHashFunction().GetType(), + output_.action.stdout_digest()); + if (digest) { + return *digest; + } + return std::nullopt; + } auto ExitCode() const noexcept -> int final { return output_.action.exit_code(); } -- cgit v1.2.3