summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2025-05-06 16:31:00 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2025-05-12 18:30:04 +0200
commit7e503da6c18c50e03d3cb1f5d7490f3c805f3b63 (patch)
tree28ac42340ae5aa1d368b6d5a126763ed4ab2bfae /test/buildtool/execution_api
parentfe4006fce755432b1ae3a273873f3649512c7f94 (diff)
downloadjustbuild-7e503da6c18c50e03d3cb1f5d7490f3c805f3b63.tar.gz
Tests: Assume only parents of out_dirs exist
... instead of the full out_dir path, which is not guaranteed by the RBE protocol.
Diffstat (limited to 'test/buildtool/execution_api')
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index 441c27b0..10f4e5a8 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -654,16 +654,18 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory,
auto output_path = std::filesystem::path{"foo/bar/baz"};
- auto action = api->CreateAction(
- *api->UploadTree({}),
- {"/bin/sh",
- "-c",
- fmt::format("set -e\n [ -d {} ]", output_path.string())},
- "",
- {},
- {output_path},
- {},
- props);
+ auto action =
+ api->CreateAction(*api->UploadTree({}),
+ {"/bin/sh",
+ "-c",
+ fmt::format("set -e\n [ -d {} ]\n mkdir -p {}",
+ output_path.parent_path().string(),
+ output_path.string())},
+ "",
+ {},
+ {output_path},
+ {},
+ props);
SECTION("Cache execution result in action cache") {
action->SetCacheFlag(IExecutionAction::CacheFlag::CacheOutput);