diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-01-08 11:13:42 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-01-09 11:35:45 +0100 |
commit | 3987f571650c591ec895cb82745fac2c895c66d2 (patch) | |
tree | 4adf62897fd15811399847babc2a71d8f2e66132 /test/buildtool/execution_engine/executor/executor.test.cpp | |
parent | a5b0964d71fc943347d1e961b68929710a0f632d (diff) | |
download | justbuild-3987f571650c591ec895cb82745fac2c895c66d2.tar.gz |
Refactor GraphTraverser to take in platform properties and dispatch list
In order for the serve endpoint to correctly dispatch a build to
the correct remote-execution endpoint, the platform properties and
dispatch list for a build need to be passed explicitly to the
executor (via the graph traverser instance) instead of always being
taken from the RemoteExecutionConfig struct.
This commit implements these changes, including updating existing
tests accordingly.
Diffstat (limited to 'test/buildtool/execution_engine/executor/executor.test.cpp')
-rw-r--r-- | test/buildtool/execution_engine/executor/executor.test.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/buildtool/execution_engine/executor/executor.test.cpp b/test/buildtool/execution_engine/executor/executor.test.cpp index 55417016..c60326c1 100644 --- a/test/buildtool/execution_engine/executor/executor.test.cpp +++ b/test/buildtool/execution_engine/executor/executor.test.cpp @@ -264,7 +264,7 @@ TEST_CASE("Executor: Process artifact", "[executor]") { SECTION("Processing succeeds for valid config") { auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, api.get(), api.get(), {}, {}}; CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id))); CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id))); @@ -274,7 +274,7 @@ TEST_CASE("Executor: Process artifact", "[executor]") { config.artifacts["local.cpp"].uploads = false; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, api.get(), api.get(), {}, {}}; CHECK(not runner.Process(g.ArtifactNodeWithId(local_cpp_id))); CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id))); @@ -284,7 +284,7 @@ TEST_CASE("Executor: Process artifact", "[executor]") { config.artifacts["known.cpp"].available = false; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, api.get(), api.get(), {}, {}}; CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id))); CHECK(not runner.Process(g.ArtifactNodeWithId(known_cpp_id))); @@ -317,7 +317,7 @@ TEST_CASE("Executor: Process action", "[executor]") { SECTION("Processing succeeds for valid config") { auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, 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.response.cached = false; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, 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.artifacts["output2.exe"].available = false; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, 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.failed = true; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, api.get(), api.get(), {}, {}}; CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id))); CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id))); @@ -372,7 +372,7 @@ TEST_CASE("Executor: Process action", "[executor]") { config.response.exit_code = 1; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, api.get(), api.get(), {}, {}}; CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id))); CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id))); @@ -388,7 +388,7 @@ TEST_CASE("Executor: Process action", "[executor]") { config.execution.outputs = {"output1.exe" /*, "output2.exe"*/}; auto api = TestApi::Ptr{new TestApi{config}}; - Executor runner{&repo_config, api.get(), api.get(), {}}; + Executor runner{&repo_config, api.get(), api.get(), {}, {}}; CHECK(runner.Process(g.ArtifactNodeWithId(local_cpp_id))); CHECK(runner.Process(g.ArtifactNodeWithId(known_cpp_id))); |