summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-07-27 18:54:16 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-07-28 10:25:42 +0200
commit3d6e428d1990bd17f01ccdc84881e114c05384b4 (patch)
treeb4ab2dab678bdcacb3b150ba81db18970ce3ceaa
parent6ea05060800553eead29e8ba1cf627f7b2623c71 (diff)
downloadjustbuild-3d6e428d1990bd17f01ccdc84881e114c05384b4.tar.gz
Executor Test: Add proper guards for optionals
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor_api.test.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp
index f36a89b8..d1b13ee5 100755
--- a/test/buildtool/execution_engine/executor/executor_api.test.hpp
+++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp
@@ -106,6 +106,7 @@ static inline void RunHelloWorldCompilation(ApiFactory const& factory,
// retrieve ALL artifacts
REQUIRE(FileSystemManager::CreateDirectory(tmpdir));
for (auto const& artifact_id : g.ArtifactIdentifiers()) {
+ REQUIRE(g.ArtifactNodeWithId(artifact_id)->Content().Info());
CHECK(api->RetrieveToPaths(
{*g.ArtifactNodeWithId(artifact_id)->Content().Info()},
{(tmpdir / "output").string()}));
@@ -213,6 +214,7 @@ static inline void RunGreeterCompilation(ApiFactory const& factory,
// retrieve ALL artifacts
REQUIRE(FileSystemManager::CreateDirectory(tmpdir));
for (auto const& artifact_id : g.ArtifactIdentifiers()) {
+ REQUIRE(g.ArtifactNodeWithId(artifact_id)->Content().Info());
CHECK(api->RetrieveToPaths(
{*g.ArtifactNodeWithId(artifact_id)->Content().Info()},
{(tmpdir / "output").string()}));
@@ -363,6 +365,7 @@ static inline void TestUploadAndDownloadTrees(ApiFactory const& factory,
std::vector<Artifact::ObjectInfo> infos{};
std::vector<std::filesystem::path> paths{};
for (auto const& [path, node] : action_node->OutputFiles()) {
+ REQUIRE(node->Content().Info());
paths.emplace_back(tmpdir / path);
infos.emplace_back(*node->Content().Info());
}