summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_engine/executor
diff options
context:
space:
mode:
Diffstat (limited to 'test/buildtool/execution_engine/executor')
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor.test.cpp22
-rwxr-xr-xtest/buildtool/execution_engine/executor/executor_api.test.hpp20
2 files changed, 25 insertions, 17 deletions
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp
index 0ea030d0..73710f9a 100755
--- a/test/buildtool/execution_engine/executor/executor.test.cpp
+++ b/test/buildtool/execution_engine/executor/executor.test.cpp
@@ -130,8 +130,8 @@ class TestApi : public IExecutionApi {
bool /*unused*/) noexcept -> bool final {
return false; // not needed by Executor
}
- auto RetrieveToCas(std::vector<Artifact::ObjectInfo> const& artifacts_info,
- gsl::not_null<IExecutionApi*> api) noexcept
+ auto RetrieveToCas(std::vector<Artifact::ObjectInfo> const& /*unused*/,
+ gsl::not_null<IExecutionApi*> const& /*unused*/) noexcept
-> bool final {
return false; // not needed by Executor
}
@@ -235,7 +235,7 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
SECTION("Processing succeeds for valid config") {
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -245,7 +245,7 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
config.artifacts["local.cpp"].uploads = false;
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(not runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -255,7 +255,7 @@ TEST_CASE("Executor: Process artifact", "[executor]") {
config.artifacts["known.cpp"].available = false;
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(not runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -288,7 +288,7 @@ TEST_CASE("Executor: Process action", "[executor]") {
SECTION("Processing succeeds for valid config") {
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -301,7 +301,7 @@ TEST_CASE("Executor: Process action", "[executor]") {
config.response.cached = false;
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -314,7 +314,7 @@ TEST_CASE("Executor: Process action", "[executor]") {
config.artifacts["output2.exe"].available = false;
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -330,7 +330,7 @@ TEST_CASE("Executor: Process action", "[executor]") {
config.execution.failed = true;
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -343,7 +343,7 @@ TEST_CASE("Executor: Process action", "[executor]") {
config.response.exit_code = 1;
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
@@ -359,7 +359,7 @@ TEST_CASE("Executor: Process action", "[executor]") {
config.execution.outputs = {"output1.exe" /*, "output2.exe"*/};
auto api = TestApi::Ptr{new TestApi{config}};
- Executor runner{api.get(), {}};
+ Executor runner{api.get(), api.get(), {}};
CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id)));
CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id)));
diff --git a/test/buildtool/execution_engine/executor/executor_api.test.hpp b/test/buildtool/execution_engine/executor/executor_api.test.hpp
index 4fe06aa1..58b19897 100755
--- a/test/buildtool/execution_engine/executor/executor_api.test.hpp
+++ b/test/buildtool/execution_engine/executor/executor_api.test.hpp
@@ -88,7 +88,8 @@ static inline void RunHelloWorldCompilation(ApiFactory const& factory,
CHECK(g.ArtifactNodeWithId(exec_id)->HasBuilderAction());
auto api = factory();
- Executor runner{api.get(), RemoteExecutionConfig::PlatformProperties()};
+ Executor runner{
+ api.get(), api.get(), RemoteExecutionConfig::PlatformProperties()};
// upload local artifacts
auto const* main_cpp_node = g.ArtifactNodeWithId(main_cpp_id);
@@ -190,7 +191,8 @@ static inline void RunGreeterCompilation(ApiFactory const& factory,
CHECK(g.Add({compile_greet_desc, make_lib_desc, make_exe_desc}));
auto api = factory();
- Executor runner{api.get(), RemoteExecutionConfig::PlatformProperties()};
+ Executor runner{
+ api.get(), api.get(), RemoteExecutionConfig::PlatformProperties()};
// upload local artifacts
for (auto const& id : {greet_hpp_id, greet_cpp_id, main_cpp_id}) {
@@ -296,7 +298,8 @@ static inline void TestUploadAndDownloadTrees(ApiFactory const& factory,
auto foo_id = g.AddArtifact(foo_desc);
auto bar_id = g.AddArtifact(bar_desc);
- Executor runner{api.get(), RemoteExecutionConfig::PlatformProperties()};
+ Executor runner{
+ api.get(), api.get(), RemoteExecutionConfig::PlatformProperties()};
REQUIRE(runner.Process(g.ArtifactNodeWithId(foo_id)));
REQUIRE(runner.Process(g.ArtifactNodeWithId(bar_id)));
@@ -435,7 +438,8 @@ static inline void TestRetrieveOutputDirectories(ApiFactory const& factory,
// run action
auto api = factory();
- Executor runner{api.get(), RemoteExecutionConfig::PlatformProperties()};
+ Executor runner{
+ api.get(), api.get(), RemoteExecutionConfig::PlatformProperties()};
REQUIRE(runner.Process(action));
// read output
@@ -478,7 +482,8 @@ static inline void TestRetrieveOutputDirectories(ApiFactory const& factory,
// run action
auto api = factory();
- Executor runner{api.get(), RemoteExecutionConfig::PlatformProperties()};
+ Executor runner{
+ api.get(), api.get(), RemoteExecutionConfig::PlatformProperties()};
REQUIRE(runner.Process(action));
// read output
@@ -537,7 +542,8 @@ static inline void TestRetrieveOutputDirectories(ApiFactory const& factory,
// run action
auto api = factory();
- Executor runner{api.get(), RemoteExecutionConfig::PlatformProperties()};
+ Executor runner{
+ api.get(), api.get(), RemoteExecutionConfig::PlatformProperties()};
REQUIRE(runner.Process(action));
// read output
@@ -602,6 +608,7 @@ static inline void TestRetrieveOutputDirectories(ApiFactory const& factory,
// run action
auto api = factory();
Executor runner{api.get(),
+ api.get(),
RemoteExecutionConfig::PlatformProperties()};
CHECK_FALSE(runner.Process(action));
}
@@ -621,6 +628,7 @@ static inline void TestRetrieveOutputDirectories(ApiFactory const& factory,
// run action
auto api = factory();
Executor runner{api.get(),
+ api.get(),
RemoteExecutionConfig::PlatformProperties()};
CHECK_FALSE(runner.Process(action));
}