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. --- .../build_engine/target_map/target_map.test.cpp | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'test/buildtool/build_engine/target_map/target_map.test.cpp') diff --git a/test/buildtool/build_engine/target_map/target_map.test.cpp b/test/buildtool/build_engine/target_map/target_map.test.cpp index c3a875a7..18236837 100644 --- a/test/buildtool/build_engine/target_map/target_map.test.cpp +++ b/test/buildtool/build_engine/target_map/target_map.test.cpp @@ -106,10 +106,11 @@ TEST_CASE("simple targets", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -556,10 +557,11 @@ TEST_CASE("configuration deduplication", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -651,10 +653,11 @@ TEST_CASE("generator functions in string arguments", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -758,10 +761,11 @@ TEST_CASE("built-in rules", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -975,10 +979,11 @@ TEST_CASE("target reference", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -1125,10 +1130,11 @@ TEST_CASE("trees", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -1239,10 +1245,11 @@ TEST_CASE("RESULT error reporting", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; @@ -1412,10 +1419,11 @@ TEST_CASE("wrong arguments", "[target_map]") { auto serve_config = TestServeConfig::ReadFromEnvironment(); REQUIRE(serve_config); + LocalExecutionConfig local_exec_config{}; Auth auth{}; ApiBundle const apis{&storage_config.Get(), &storage, - &LocalExecutionConfig::Instance(), + &local_exec_config, /*repo_config=*/nullptr, &auth, RemoteExecutionConfig::RemoteAddress()}; -- cgit v1.2.3