summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_engine/executor
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-08 11:28:13 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-16 17:51:12 +0200
commit978de9de55d9592c258052dd52dc25c788a89d78 (patch)
treedff959d84f1d95af1f0546471d3b2c7eaa47dbc2 /test/buildtool/execution_engine/executor
parentb4cd4d0c0d1b526eab3549c9cba12179dbba3a3f (diff)
downloadjustbuild-978de9de55d9592c258052dd52dc25c788a89d78.tar.gz
Remove the LocalExecutionConfig singleton
...and replace it with passed instances created early via a builder pattern.
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rw-r--r--test/buildtool/execution_engine/executor/executor_api_local.test.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/buildtool/execution_engine/executor/executor_api_local.test.cpp b/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
index d8e9fd96..4fee58da 100644
--- a/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor_api_local.test.cpp
@@ -32,12 +32,11 @@ TEST_CASE("Executor<LocalApi>: Upload blob", "[executor]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
+ LocalExecutionConfig local_exec_config{};
RepositoryConfig repo_config{};
TestBlobUpload(&repo_config, [&] {
- return std::make_unique<LocalApi>(&storage_config.Get(),
- &storage,
- &LocalExecutionConfig::Instance(),
- &repo_config);
+ return std::make_unique<LocalApi>(
+ &storage_config.Get(), &storage, &local_exec_config, &repo_config);
});
}
@@ -45,6 +44,7 @@ TEST_CASE("Executor<LocalApi>: Compile hello world", "[executor]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
+ LocalExecutionConfig local_exec_config{};
RepositoryConfig repo_config{};
Statistics stats{};
Progress progress{};
@@ -57,7 +57,7 @@ TEST_CASE("Executor<LocalApi>: Compile hello world", "[executor]") {
[&] {
return std::make_unique<LocalApi>(&storage_config.Get(),
&storage,
- &LocalExecutionConfig::Instance(),
+ &local_exec_config,
&repo_config);
},
&*auth_config);
@@ -67,6 +67,7 @@ TEST_CASE("Executor<LocalApi>: Compile greeter", "[executor]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
+ LocalExecutionConfig local_exec_config{};
RepositoryConfig repo_config{};
Statistics stats{};
Progress progress{};
@@ -79,7 +80,7 @@ TEST_CASE("Executor<LocalApi>: Compile greeter", "[executor]") {
[&] {
return std::make_unique<LocalApi>(&storage_config.Get(),
&storage,
- &LocalExecutionConfig::Instance(),
+ &local_exec_config,
&repo_config);
},
&*auth_config);
@@ -89,6 +90,7 @@ TEST_CASE("Executor<LocalApi>: Upload and download trees", "[executor]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
+ LocalExecutionConfig local_exec_config{};
RepositoryConfig repo_config{};
Statistics stats{};
Progress progress{};
@@ -101,7 +103,7 @@ TEST_CASE("Executor<LocalApi>: Upload and download trees", "[executor]") {
[&] {
return std::make_unique<LocalApi>(&storage_config.Get(),
&storage,
- &LocalExecutionConfig::Instance(),
+ &local_exec_config,
&repo_config);
},
&*auth_config);
@@ -111,6 +113,7 @@ TEST_CASE("Executor<LocalApi>: Retrieve output directories", "[executor]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
+ LocalExecutionConfig local_exec_config{};
RepositoryConfig repo_config{};
Statistics stats{};
Progress progress{};
@@ -123,7 +126,7 @@ TEST_CASE("Executor<LocalApi>: Retrieve output directories", "[executor]") {
[&] {
return std::make_unique<LocalApi>(&storage_config.Get(),
&storage,
- &LocalExecutionConfig::Instance(),
+ &local_exec_config,
&repo_config);
},
&*auth_config);