diff options
Diffstat (limited to 'test/buildtool/execution_api')
-rw-r--r-- | test/buildtool/execution_api/common/api_test.hpp | 16 | ||||
-rw-r--r-- | test/buildtool/execution_api/local/local_execution.test.cpp | 8 |
2 files changed, 19 insertions, 5 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp index 6d8e7928..54394b62 100644 --- a/test/buildtool/execution_api/common/api_test.hpp +++ b/test/buildtool/execution_api/common/api_test.hpp @@ -70,8 +70,13 @@ using ExecProps = std::map<std::string, std::string>; auto api = api_factory(); - auto action = api->CreateAction( - *api->UploadTree({}), {"echo", "-n", test_content}, {}, {}, {}, props); + auto action = api->CreateAction(*api->UploadTree({}), + {"echo", "-n", test_content}, + "", + {}, + {}, + {}, + props); SECTION("Cache execution result in action cache") { action->SetCacheFlag(IExecutionAction::CacheFlag::CacheOutput); @@ -147,6 +152,7 @@ using ExecProps = std::map<std::string, std::string>; {"/bin/sh", "-c", "set -e\necho -n " + test_content + " > " + output_path}, + "", {output_path}, {}, {}, @@ -238,6 +244,7 @@ using ExecProps = std::map<std::string, std::string>; auto action = api->CreateAction(*api->UploadTree({{input_path, &input_artifact}}), {"cp", input_path, output_path}, + "", {output_path}, {}, {}, @@ -320,6 +327,7 @@ using ExecProps = std::map<std::string, std::string>; "-c", "set -e\necho -n " + test_content + " > " + output_path + "\nexit 1\n"}, + "", {output_path}, {}, {}, @@ -412,6 +420,7 @@ using ExecProps = std::map<std::string, std::string>; auto action = api->CreateAction(*api->UploadTree({}), {"/bin/sh", "-c", make_cmd("root")}, + "", {}, {"root"}, env, @@ -484,6 +493,7 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory, auto action = api->CreateAction(*api->UploadTree({}), {"/bin/sh", "-c", make_cmd("root")}, + "", {}, {"root"}, env, @@ -552,6 +562,7 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory, auto action = api->CreateAction(*api->UploadTree({}), {"/bin/sh", "-c", cmd}, + "", {foo_path.string(), link_path.string()}, {bar_path.parent_path().string()}, env, @@ -619,6 +630,7 @@ TestRetrieveFileAndSymlinkWithSameContentToPath(ApiFactory const& api_factory, {"/bin/sh", "-c", fmt::format("set -e\n [ -d {} ]", output_path.string())}, + "", {}, {output_path}, {}, diff --git a/test/buildtool/execution_api/local/local_execution.test.cpp b/test/buildtool/execution_api/local/local_execution.test.cpp index a08f3b87..49141076 100644 --- a/test/buildtool/execution_api/local/local_execution.test.cpp +++ b/test/buildtool/execution_api/local/local_execution.test.cpp @@ -79,7 +79,7 @@ TEST_CASE("LocalExecution: No input, no output", "[execution_api]") { std::string test_content("test"); std::vector<std::string> const cmdline = {"echo", "-n", test_content}; auto action = - api.CreateAction(*api.UploadTree({}), cmdline, {}, {}, {}, {}); + api.CreateAction(*api.UploadTree({}), cmdline, "", {}, {}, {}, {}); REQUIRE(action); SECTION("Cache execution result in action cache") { @@ -134,6 +134,7 @@ TEST_CASE("LocalExecution: No input, no output, env variables used", "/bin/sh", "-c", "set -e\necho -n ${MYCONTENT}"}; auto action = api.CreateAction(*api.UploadTree({}), cmdline, + "", {}, {}, {{"MYCONTENT", test_content}}, @@ -198,7 +199,7 @@ TEST_CASE("LocalExecution: No input, create output", "[execution_api]") { "set -e\necho -n " + test_content + " > " + output_path}; auto action = api.CreateAction( - *api.UploadTree({}), cmdline, {output_path}, {}, {}, {}); + *api.UploadTree({}), cmdline, "", {output_path}, {}, {}, {}); REQUIRE(action); SECTION("Cache execution result in action cache") { @@ -273,6 +274,7 @@ TEST_CASE("LocalExecution: One input copied to output", "[execution_api]") { auto action = api.CreateAction(*api.UploadTree({{input_path, &local_artifact}}), cmdline, + "", {output_path}, {}, {}, @@ -335,7 +337,7 @@ TEST_CASE("LocalExecution: Cache failed action's result", "[execution_api]") { "sh", "-c", fmt::format("[ -f '{}' ]", flag.string())}; auto action = - api.CreateAction(*api.UploadTree({}), cmdline, {}, {}, {}, {}); + api.CreateAction(*api.UploadTree({}), cmdline, "", {}, {}, {}, {}); REQUIRE(action); action->SetCacheFlag(IExecutionAction::CacheFlag::CacheOutput); |