summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/local/local_response.hpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2025-03-17 14:31:58 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-03-17 17:19:55 +0100
commitb1ccb71a4bdbacd44843abfa9497576016962ed8 (patch)
tree8067a825669baf7ca2dfd98f43da9d6c70c3e23f /src/buildtool/execution_api/local/local_response.hpp
parentdd02daeb0ce20780ed96c4ab2738a7f2b8b986e5 (diff)
downloadjustbuild-b1ccb71a4bdbacd44843abfa9497576016962ed8.tar.gz
execution_api: support reading off stdout/stderr digests
Diffstat (limited to 'src/buildtool/execution_api/local/local_response.hpp')
-rw-r--r--src/buildtool/execution_api/local/local_response.hpp18
1 files changed, 18 insertions, 0 deletions
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<ArtifactDigest> final {
+ auto digest = ArtifactDigestFactory::FromBazel(
+ storage_.GetHashFunction().GetType(),
+ output_.action.stderr_digest());
+ if (digest) {
+ return *digest;
+ }
+ return std::nullopt;
+ }
+ auto StdOutDigest() noexcept -> std::optional<ArtifactDigest> 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();
}