summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-17 16:47:00 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-19 09:50:37 +0200
commite91d4e8a1b9c2a2b95b2105c5c39515abd791733 (patch)
tree800207f8975050a62df88deafc1245d1ba6b75fa
parentfaa8fc156ed8314db23a2d1612975ee745a50ade (diff)
downloadjustbuild-e91d4e8a1b9c2a2b95b2105c5c39515abd791733.tar.gz
api_test: Rename SetLauncher to CreateLocalExecConfig
This is in line with similar change in other tests, as this name is more appropriate for its purpose.
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp2
-rw-r--r--test/buildtool/execution_api/local/local_api.test.cpp16
2 files changed, 9 insertions, 9 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index f9a814f7..e2d8a17d 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -32,7 +32,7 @@
using ApiFactory = std::function<IExecutionApi::Ptr()>;
using ExecProps = std::map<std::string, std::string>;
-[[nodiscard]] static inline auto SetLauncher() noexcept
+[[nodiscard]] static inline auto CreateLocalExecConfig() noexcept
-> LocalExecutionConfig {
std::vector<std::string> launcher{"env"};
auto* env_path = std::getenv("PATH");
diff --git a/test/buildtool/execution_api/local/local_api.test.cpp b/test/buildtool/execution_api/local/local_api.test.cpp
index 6a6b899a..33bd8d38 100644
--- a/test/buildtool/execution_api/local/local_api.test.cpp
+++ b/test/buildtool/execution_api/local/local_api.test.cpp
@@ -51,7 +51,7 @@ class FactoryApi final {
TEST_CASE("LocalAPI: No input, no output", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestNoInputNoOutput(api_factory, {}, /*is_hermetic=*/true);
@@ -60,7 +60,7 @@ TEST_CASE("LocalAPI: No input, no output", "[execution_api]") {
TEST_CASE("LocalAPI: No input, create output", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestNoInputCreateOutput(api_factory, {}, /*is_hermetic=*/true);
@@ -69,7 +69,7 @@ TEST_CASE("LocalAPI: No input, create output", "[execution_api]") {
TEST_CASE("LocalAPI: One input copied to output", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestOneInputCopiedToOutput(api_factory, {}, /*is_hermetic=*/true);
@@ -78,7 +78,7 @@ TEST_CASE("LocalAPI: One input copied to output", "[execution_api]") {
TEST_CASE("LocalAPI: Non-zero exit code, create output", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestNonZeroExitCodeCreateOutput(api_factory, {});
@@ -87,7 +87,7 @@ TEST_CASE("LocalAPI: Non-zero exit code, create output", "[execution_api]") {
TEST_CASE("LocalAPI: Retrieve two identical trees to path", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestRetrieveTwoIdenticalTreesToPath(
@@ -98,7 +98,7 @@ TEST_CASE("LocalAPI: Retrieve file and symlink with same content to path",
"[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestRetrieveFileAndSymlinkWithSameContentToPath(
@@ -108,7 +108,7 @@ TEST_CASE("LocalAPI: Retrieve file and symlink with same content to path",
TEST_CASE("LocalAPI: Retrieve mixed blobs and trees", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestRetrieveMixedBlobsAndTrees(
@@ -118,7 +118,7 @@ TEST_CASE("LocalAPI: Retrieve mixed blobs and trees", "[execution_api]") {
TEST_CASE("LocalAPI: Create directory prior to execution", "[execution_api]") {
auto const storage_config = TestStorageConfig::Create();
auto const storage = Storage::Create(&storage_config.Get());
- auto const local_exec_config = SetLauncher();
+ auto const local_exec_config = CreateLocalExecConfig();
FactoryApi api_factory(&storage_config.Get(), &storage, &local_exec_config);
TestCreateDirPriorToExecution(api_factory, {}, /*is_hermetic=*/true);