summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_engine/executor
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rw-r--r--test/buildtool/execution_engine/executor/TARGETS1
-rw-r--r--test/buildtool/execution_engine/executor/executor.test.cpp10
2 files changed, 7 insertions, 4 deletions
diff --git a/test/buildtool/execution_engine/executor/TARGETS b/test/buildtool/execution_engine/executor/TARGETS
index bb86c6d8..343b83eb 100644
--- a/test/buildtool/execution_engine/executor/TARGETS
+++ b/test/buildtool/execution_engine/executor/TARGETS
@@ -43,6 +43,7 @@
, ["@", "src", "src/buildtool/execution_engine/executor", "executor"]
, ["@", "src", "src/buildtool/progress_reporting", "progress"]
, ["@", "src", "src/buildtool/crypto", "hash_function"]
+ , ["@", "src", "src/utils/cpp", "expected"]
, ["", "catch-main"]
, ["@", "catch2", "", "catch2"]
, ["@", "gsl", "", "gsl"]
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp
index 48bcf082..e2d62342 100644
--- a/test/buildtool/execution_engine/executor/executor.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor.test.cpp
@@ -38,6 +38,7 @@
#include "src/buildtool/execution_engine/executor/context.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/progress_reporting/progress.hpp"
+#include "src/utils/cpp/expected.hpp"
#include "test/utils/executor/test_api_bundle.hpp"
#include "test/utils/hermeticity/test_hash_function_type.hpp"
@@ -97,16 +98,17 @@ class TestResponse : public IExecutionResponse {
static const std::string kEmptyHash;
return kEmptyHash;
}
- [[nodiscard]] auto Artifacts() noexcept -> ArtifactInfos const& final {
+ [[nodiscard]] auto Artifacts() noexcept
+ -> expected<gsl::not_null<ArtifactInfos const*>, std::string> final {
if (not populated_) {
Populate();
}
- return artifacts_;
+ return gsl::not_null<ArtifactInfos const*>(&artifacts_);
}
[[nodiscard]] auto DirectorySymlinks() noexcept
- -> DirSymlinks const& final {
+ -> expected<gsl::not_null<DirSymlinks const*>, std::string> final {
static const DirSymlinks kEmptySymlinks{};
- return kEmptySymlinks;
+ return gsl::not_null<DirSymlinks const*>(&kEmptySymlinks);
}
private: