-
Notifications
You must be signed in to change notification settings - Fork 33
Extend switch_run_target test to also cover feat_req__lifecycle__process_ordering and comp_req__launch_man__launch_manager_shutdown #442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MaciejKaszynski
merged 11 commits into
eclipse-score:main
from
etas-contrib:feature/extend_switch_run_target_test
Aug 11, 2026
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9b38291
Update requirements list
TimoSteuerwaldETAS f6e9937
Replace reporting_process.cpp with component_e.cpp
TimoSteuerwaldETAS 2baae5e
Adapt test to cover switch run target and shutdown test
TimoSteuerwaldETAS bccc0e2
Fix format
TimoSteuerwaldETAS 8939cc4
Requirement is no longer on feature, but on cmp level
TimoSteuerwaldETAS 0332bc8
Remove duplication for cmp d and e
TimoSteuerwaldETAS d2dd181
Strip down config
TimoSteuerwaldETAS 25d8b2c
Rework control_client_mock.cpp
TimoSteuerwaldETAS b33477c
Update test description to match to latest changes
TimoSteuerwaldETAS 0df6486
Merge branch 'main' into feature/extend_switch_run_target_test
TimoSteuerwaldETAS ddf7149
Merge branch 'main' into feature/extend_switch_run_target_test
TimoSteuerwaldETAS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,5 +28,4 @@ PROC_FILES(d) | |
| PROC_FILES(e) | ||
|
|
||
| #undef PROC_FILES | ||
|
|
||
| #endif | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
| #include <gtest/gtest.h> | ||
| #include <iostream> | ||
| #include <string> | ||
| #include <string_view> | ||
|
|
||
| #include "common.hpp" | ||
| #include "tests/utils/test_helper/test_helper.hpp" | ||
| #include <score/mw/lifecycle/report_running.h> | ||
|
|
||
| /// @file component_d_or_e.cpp | ||
| /// @brief Shared source for components D and E of the switch_run_target test. | ||
| /// The component is selected by the single command line argument "d" or | ||
| /// "e"; the process writes its "started" marker once it has reported | ||
| /// running and its "terminating" marker just before it exits. | ||
|
|
||
| namespace | ||
| { | ||
| std::string_view g_started; | ||
| std::string_view g_terminating; | ||
| std::string g_xml_name; | ||
| } // namespace | ||
|
|
||
| TEST(Component, RunAndVerify) | ||
| { | ||
| TEST_STEP("Report running") | ||
| { | ||
| EXPECT_TRUE(touch_file(g_started)) << "failed to deploy file"; | ||
| score::mw::lifecycle::report_running(); | ||
| } | ||
| while (!TestRunner::exitRequested) | ||
| { | ||
| pause(); | ||
| } | ||
| EXPECT_TRUE(touch_file(g_terminating)) << "Failed to deploy file"; | ||
| } | ||
|
|
||
| int main(int argc, char** argv) | ||
| { | ||
| if (argc != 2) | ||
| { | ||
| std::cerr << "Usage: component_d_or_e <d|e>" << std::endl; | ||
| return EXIT_FAILURE; | ||
| } | ||
|
|
||
| const std::string_view component{argv[1]}; | ||
| if (component == "d") | ||
| { | ||
| g_started = d_started; | ||
| g_terminating = d_terminating; | ||
| } | ||
| else if (component == "e") | ||
| { | ||
| g_started = e_started; | ||
| g_terminating = e_terminating; | ||
| } | ||
| else | ||
| { | ||
| std::cerr << "Invalid argument '" << component << "', expected 'd' or 'e'" << std::endl; | ||
| return EXIT_FAILURE; | ||
| } | ||
|
|
||
| // Name the GTest XML result file per component so the two binaries built from | ||
| // this source write distinct results. | ||
| g_xml_name = "component_" + std::string{component}; | ||
| return TestRunner(g_xml_name).RunTests(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.