summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/local/local_execution.test.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-05 17:18:19 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-16 17:51:12 +0200
commiteb8d824360ce262502c5fc06072ebf07ea278bec (patch)
tree9b77e49502d333642af13c4b346444ea3a316340 /test/buildtool/execution_api/local/local_execution.test.cpp
parent9a3b4efaef5225ed968fb86a9d7d10ac784ceccf (diff)
downloadjustbuild-eb8d824360ce262502c5fc06072ebf07ea278bec.tar.gz
Pass LocalExecutionConfig to LocalAction and LocalApi
Diffstat (limited to 'test/buildtool/execution_api/local/local_execution.test.cpp')
-rw-r--r--test/buildtool/execution_api/local/local_execution.test.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp
index 4c2e309c..e8489b33 100644
--- a/test/buildtool/execution_api/local/local_execution.test.cpp
+++ b/test/buildtool/execution_api/local/local_execution.test.cpp
@@ -63,7 +63,10 @@ TEST_CASE("LocalExecution: No input, no output", "[execution_api]") {
auto const storage = Storage::Create(&storage_config.Get());
RepositoryConfig repo_config{};
- auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(),
+ &storage,
+ &LocalExecutionConfig::Instance(),
+ &repo_config);
std::string test_content("test");
std::vector<std::string> const cmdline = {"echo", "-n", test_content};
@@ -111,7 +114,10 @@ TEST_CASE("LocalExecution: No input, no output, env variables used",
auto const storage = Storage::Create(&storage_config.Get());
RepositoryConfig repo_config{};
- auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(),
+ &storage,
+ &LocalExecutionConfig::Instance(),
+ &repo_config);
std::string test_content("test from env var");
std::vector<std::string> const cmdline = {
@@ -162,7 +168,10 @@ TEST_CASE("LocalExecution: No input, create output", "[execution_api]") {
auto const storage = Storage::Create(&storage_config.Get());
RepositoryConfig repo_config{};
- auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(),
+ &storage,
+ &LocalExecutionConfig::Instance(),
+ &repo_config);
std::string test_content("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
@@ -219,7 +228,10 @@ TEST_CASE("LocalExecution: One input copied to output", "[execution_api]") {
auto const storage = Storage::Create(&storage_config.Get());
RepositoryConfig repo_config{};
- auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(),
+ &storage,
+ &LocalExecutionConfig::Instance(),
+ &repo_config);
std::string test_content("test");
auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
@@ -289,7 +301,10 @@ TEST_CASE("LocalExecution: Cache failed action's result", "[execution_api]") {
auto const storage = Storage::Create(&storage_config.Get());
RepositoryConfig repo_config{};
- auto api = LocalApi(&storage_config.Get(), &storage, &repo_config);
+ auto api = LocalApi(&storage_config.Get(),
+ &storage,
+ &LocalExecutionConfig::Instance(),
+ &repo_config);
auto flag = GetTestDir() / "flag";
std::vector<std::string> const cmdline = {