summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/bazel/bazel_network.test.cpp
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-02-21 16:33:05 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2023-02-22 11:52:39 +0100
commit2f4a589f869a3667f60499a71eb24c6add533193 (patch)
tree17902b7cd9bbe40fb8acccfeeb20a76c6b829053 /test/buildtool/execution_api/bazel/bazel_network.test.cpp
parent1d954d5a1f06e65b8422b32d53d69db9fed2d60b (diff)
downloadjustbuild-2f4a589f869a3667f60499a71eb24c6add533193.tar.gz
ExecutionApi: Retrieve to correct CAS directly
... by keeping track of each blob being a file or executable and storing it to the correct local physical CAS directory. The new flag is merely a hint and only used by the local execution API. Leaving it out will still correctly transfer the blob but may cause unnecessary duplicates in file CAS.
Diffstat (limited to 'test/buildtool/execution_api/bazel/bazel_network.test.cpp')
-rw-r--r--test/buildtool/execution_api/bazel/bazel_network.test.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/buildtool/execution_api/bazel/bazel_network.test.cpp b/test/buildtool/execution_api/bazel/bazel_network.test.cpp
index ccfcd695..b7f801f2 100644
--- a/test/buildtool/execution_api/bazel/bazel_network.test.cpp
+++ b/test/buildtool/execution_api/bazel/bazel_network.test.cpp
@@ -31,11 +31,14 @@ TEST_CASE("Bazel network: write/read blobs", "[execution_api]") {
std::string content_baz(kLargeSize, 'x'); // single larger blob
BazelBlob foo{ArtifactDigest::Create<ObjectType::File>(content_foo),
- content_foo};
+ content_foo,
+ /*is_exec=*/false};
BazelBlob bar{ArtifactDigest::Create<ObjectType::File>(content_bar),
- content_bar};
+ content_bar,
+ /*is_exec=*/false};
BazelBlob baz{ArtifactDigest::Create<ObjectType::File>(content_baz),
- content_baz};
+ content_baz,
+ /*is_exec=*/false};
// Search blobs via digest
REQUIRE(network.UploadBlobs(BlobContainer{{foo, bar, baz}}));
@@ -75,9 +78,11 @@ TEST_CASE("Bazel network: read blobs with unknown size", "[execution_api]") {
std::string content_bar(kLargeSize, 'x'); // single larger blob
BazelBlob foo{ArtifactDigest::Create<ObjectType::File>(content_foo),
- content_foo};
+ content_foo,
+ /*is_exec=*/false};
BazelBlob bar{ArtifactDigest::Create<ObjectType::File>(content_bar),
- content_bar};
+ content_bar,
+ /*is_exec=*/false};
// Upload blobs
REQUIRE(network.UploadBlobs(BlobContainer{{foo, bar}}));