summaryrefslogtreecommitdiff
path: root/test/buildtool/build_engine/target_map/target_map.test.cpp
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/build_engine/target_map/target_map.test.cpp
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/build_engine/target_map/target_map.test.cpp')
-rw-r--r--test/buildtool/build_engine/target_map/target_map.test.cpp24
1 files changed, 16 insertions, 8 deletions
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()};