summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/common/api_test.hpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2025-06-23 12:09:21 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2025-06-24 12:56:57 +0200
commit95f230b3a755f66183ce5c27e929ed6ae3838977 (patch)
treeb84ced1cbb6ba97984780434eaf525d843a67bba /test/buildtool/execution_api/common/api_test.hpp
parentc49f9e8a16997d7dc4cad691a249741146101be0 (diff)
downloadjustbuild-95f230b3a755f66183ce5c27e929ed6ae3838977.tar.gz
ExecutionApi: Drop DirectorySymlinks from common api
... as it is only needed for local execution, there is no need to provide it in the common api interface.
Diffstat (limited to 'test/buildtool/execution_api/common/api_test.hpp')
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index 6ff56308..34fbb29a 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -42,6 +42,7 @@
#include "src/buildtool/execution_api/common/execution_api.hpp"
#include "src/buildtool/execution_api/common/execution_response.hpp"
#include "src/buildtool/execution_api/local/config.hpp"
+#include "src/buildtool/execution_api/local/local_response.hpp"
#include "src/buildtool/execution_engine/dag/dag.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/file_system/object_type.hpp"
@@ -763,9 +764,12 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory,
CHECK(IsTreeObject(artifacts.value()->at("baz").type));
// check if bar was correctly detected as directory symlink
- auto dir_symlinks = response->DirectorySymlinks();
- REQUIRE(dir_symlinks);
- CHECK((*dir_symlinks)->contains("bar"));
+ auto* local_response = dynamic_cast<LocalResponse*>(response.get());
+ if (local_response != nullptr) {
+ auto dir_symlinks = local_response->DirectorySymlinks();
+ REQUIRE(dir_symlinks);
+ CHECK((*dir_symlinks)->contains("bar"));
+ }
SECTION("consuming dangling symlinks") {
auto dangling_symlinks_tree = artifacts.value()->at("baz");
@@ -826,9 +830,12 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory,
CHECK(IsTreeObject(artifacts.value()->at("baz").type));
// check if bar was correctly detected as directory symlink
- auto dir_symlinks = response->DirectorySymlinks();
- REQUIRE(dir_symlinks);
- CHECK((*dir_symlinks)->contains("bar"));
+ auto* local_response = dynamic_cast<LocalResponse*>(response.get());
+ if (local_response != nullptr) {
+ auto dir_symlinks = local_response->DirectorySymlinks();
+ REQUIRE(dir_symlinks);
+ CHECK((*dir_symlinks)->contains("bar"));
+ }
SECTION("consuming upwards symlinks") {
auto upwards_symlinks_tree = artifacts.value()->at("baz");