diff options
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rwxr-xr-x | test/buildtool/execution_engine/executor/executor.test.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index e055dfd7..0ffe5e4d 100755 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -154,6 +154,20 @@ class TestApi : public IExecutionApi { return false; } } + [[nodiscard]] auto IsAvailable(std::vector<ArtifactDigest> const& digests) + const noexcept -> std::vector<ArtifactDigest> final { + std::vector<ArtifactDigest> result; + try { + for (auto const& digest : digests) { + if (not config_.artifacts.at(digest.hash()).available) { + result.push_back(digest); + } + } + } catch (std::exception const& /* unused */) { + return result; + } + return result; + } private: TestApiConfig config_{}; |