From 978de9de55d9592c258052dd52dc25c788a89d78 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 8 Jul 2024 11:28:13 +0200 Subject: Remove the LocalExecutionConfig singleton ...and replace it with passed instances created early via a builder pattern. --- .../executor/executor_api_local.test.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'test/buildtool/execution_engine/executor') 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: 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(&storage_config.Get(), - &storage, - &LocalExecutionConfig::Instance(), - &repo_config); + return std::make_unique( + &storage_config.Get(), &storage, &local_exec_config, &repo_config); }); } @@ -45,6 +44,7 @@ TEST_CASE("Executor: 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: Compile hello world", "[executor]") { [&] { return std::make_unique(&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, &repo_config); }, &*auth_config); @@ -67,6 +67,7 @@ TEST_CASE("Executor: 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: Compile greeter", "[executor]") { [&] { return std::make_unique(&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, &repo_config); }, &*auth_config); @@ -89,6 +90,7 @@ TEST_CASE("Executor: 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: Upload and download trees", "[executor]") { [&] { return std::make_unique(&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, &repo_config); }, &*auth_config); @@ -111,6 +113,7 @@ TEST_CASE("Executor: 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: Retrieve output directories", "[executor]") { [&] { return std::make_unique(&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, &repo_config); }, &*auth_config); -- cgit v1.2.3