Skip to content

Commit e0a01aa

Browse files
committed
Adding test cases for cross module integration
1 parent 0b45ed8 commit e0a01aa

8 files changed

Lines changed: 1038 additions & 382 deletions

feature_integration_tests/LIFECYCLE_TESTS_SUMMARY.md

Lines changed: 339 additions & 199 deletions
Large diffs are not rendered by default.

feature_integration_tests/test_cases/BUILD

Lines changed: 93 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,17 @@ launch_manager_config(
4343
# Tests targets
4444
score_py_pytest(
4545
name = "fit_rust",
46-
srcs = glob(["tests/**/*.py"]),
46+
srcs = glob(
47+
["tests/**/*.py"],
48+
exclude = [
49+
"tests/lifecycle/test_process_launching_with_daemon.py",
50+
"tests/lifecycle/test_lifecycle_state_manager_if.py",
51+
"tests/lifecycle/test_lifecycle_persistency_recovery.py",
52+
],
53+
),
4754
args = [
48-
"-m rust",
55+
"-m",
56+
"rust",
4957
"--traces=all",
5058
"--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_test_scenarios)",
5159
],
@@ -67,9 +75,17 @@ score_py_pytest(
6775

6876
score_py_pytest(
6977
name = "fit_cpp",
70-
srcs = glob(["tests/**/*.py"]),
78+
srcs = glob(
79+
["tests/**/*.py"],
80+
exclude = [
81+
"tests/lifecycle/test_process_launching_with_daemon.py",
82+
"tests/lifecycle/test_lifecycle_state_manager_if.py",
83+
"tests/lifecycle/test_lifecycle_persistency_recovery.py",
84+
],
85+
),
7186
args = [
72-
"-m cpp",
87+
"-m",
88+
"cpp",
7389
"--traces=all",
7490
"--cpp-target-path=$(rootpath //feature_integration_tests/test_scenarios/cpp:cpp_test_scenarios)",
7591
],
@@ -105,7 +121,10 @@ score_py_pytest(
105121
"test_properties.py",
106122
"//feature_integration_tests/test_scenarios/rust:rust_test_scenarios",
107123
"@score_lifecycle_health//examples/rust_supervised_app",
124+
"@score_lifecycle_health//examples/cpp_supervised_app",
125+
"@score_lifecycle_health//examples/control_application:control_daemon",
108126
"@score_lifecycle_health//src/launch_manager_daemon:launch_manager",
127+
":daemon_lifecycle_configs",
109128
],
110129
env = {
111130
"RUST_BACKTRACE": "1",
@@ -132,8 +151,11 @@ score_py_pytest(
132151
"persistency_scenario.py",
133152
"test_properties.py",
134153
"//feature_integration_tests/test_scenarios/cpp:cpp_test_scenarios",
154+
"@score_lifecycle_health//examples/rust_supervised_app",
135155
"@score_lifecycle_health//examples/cpp_supervised_app",
156+
"@score_lifecycle_health//examples/control_application:control_daemon",
136157
"@score_lifecycle_health//src/launch_manager_daemon:launch_manager",
158+
":daemon_lifecycle_configs",
137159
],
138160
pytest_config = "//:pyproject.toml",
139161
deps = all_requirements,
@@ -147,10 +169,77 @@ test_suite(
147169
],
148170
)
149171

172+
# Architecture-based IPC boundary + cross-module lifecycle integration tests (Rust)
173+
score_py_pytest(
174+
name = "fit_daemon_lifecycle_arc_rust",
175+
srcs = glob(["tests/lifecycle/test_lifecycle_*.py"]),
176+
args = [
177+
"-m rust",
178+
"--traces=all",
179+
"--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_test_scenarios)",
180+
],
181+
data = [
182+
"conftest.py",
183+
"daemon_helpers.py",
184+
"fit_scenario.py",
185+
"lifecycle_scenario.py",
186+
"persistency_scenario.py",
187+
"test_properties.py",
188+
# Flatbuffer daemon configs (resolved via runfiles instead of subprocess bazel build)
189+
":daemon_lifecycle_configs",
190+
# Test scenario executables (used by persistency cross-module test)
191+
"//feature_integration_tests/test_scenarios/rust:rust_test_scenarios",
192+
# Lifecycle daemon and supervised application binaries
193+
"@score_lifecycle_health//examples/control_application:control_daemon",
194+
"@score_lifecycle_health//examples/cpp_supervised_app",
195+
"@score_lifecycle_health//examples/rust_supervised_app",
196+
"@score_lifecycle_health//src/launch_manager_daemon:launch_manager",
197+
],
198+
env = {
199+
"RUST_BACKTRACE": "1",
200+
},
201+
pytest_config = "//:pyproject.toml",
202+
deps = all_requirements,
203+
)
204+
205+
# Architecture-based IPC boundary + cross-module lifecycle integration tests (C++)
206+
score_py_pytest(
207+
name = "fit_daemon_lifecycle_arc_cpp",
208+
srcs = glob(["tests/lifecycle/test_lifecycle_*.py"]),
209+
args = [
210+
"-m cpp",
211+
"--traces=all",
212+
"--cpp-target-path=$(rootpath //feature_integration_tests/test_scenarios/cpp:cpp_test_scenarios)",
213+
],
214+
data = [
215+
"conftest.py",
216+
"daemon_helpers.py",
217+
"fit_scenario.py",
218+
"lifecycle_scenario.py",
219+
"persistency_scenario.py",
220+
"test_properties.py",
221+
# Flatbuffer daemon configs (resolved via runfiles instead of subprocess bazel build)
222+
":daemon_lifecycle_configs",
223+
# Test scenario executables (used by persistency cross-module test)
224+
"//feature_integration_tests/test_scenarios/cpp:cpp_test_scenarios",
225+
# Lifecycle daemon and supervised application binaries
226+
"@score_lifecycle_health//examples/control_application:control_daemon",
227+
"@score_lifecycle_health//examples/cpp_supervised_app",
228+
"@score_lifecycle_health//examples/rust_supervised_app",
229+
"@score_lifecycle_health//src/launch_manager_daemon:launch_manager",
230+
# Communication binaries (used by comm cross-module test)
231+
"@score_communication//score/mw/com/example/ipc_bridge:ipc_bridge_cpp",
232+
],
233+
pytest_config = "//:pyproject.toml",
234+
deps = all_requirements,
235+
)
236+
150237
test_suite(
151238
name = "fit_daemon",
152239
tests = [
153240
":fit_daemon_cpp",
241+
":fit_daemon_lifecycle_arc_cpp",
242+
":fit_daemon_lifecycle_arc_rust",
154243
":fit_daemon_rust",
155244
],
156245
)

feature_integration_tests/test_cases/configs/daemon_launch_manager_config.json

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -45,57 +45,16 @@
4545
"component_properties": {
4646
"binary_name": "control_daemon",
4747
"application_profile": {
48-
"application_type": "State_Manager",
49-
"alive_supervision": {
50-
"min_indications": 0
51-
}
48+
"application_type": "Native"
5249
},
5350
"depends_on": []
5451
}
55-
},
56-
"cpp_supervised_app": {
57-
"component_properties": {
58-
"binary_name": "cpp_supervised_app",
59-
"application_profile": {
60-
"application_type": "Reporting_And_Supervised"
61-
},
62-
"process_arguments": [
63-
"-d50"
64-
]
65-
},
66-
"deployment_config": {
67-
"environmental_variables": {
68-
"PROCESSIDENTIFIER": "cpp_supervised_app",
69-
"CONFIG_PATH": "etc/hmproc_cpp_supervised_app.bin",
70-
"IDENTIFIER": "cpp_supervised_app"
71-
}
72-
}
73-
},
74-
"rust_supervised_app": {
75-
"component_properties": {
76-
"binary_name": "rust_supervised_app",
77-
"application_profile": {
78-
"application_type": "Reporting_And_Supervised"
79-
},
80-
"process_arguments": [
81-
"-d50"
82-
]
83-
},
84-
"deployment_config": {
85-
"environmental_variables": {
86-
"PROCESSIDENTIFIER": "rust_supervised_app",
87-
"CONFIG_PATH": "etc/hmproc_rust_supervised_app.bin",
88-
"IDENTIFIER": "rust_supervised_app"
89-
}
90-
}
9152
}
9253
},
9354
"run_targets": {
9455
"Startup": {
9556
"description": "Minimal functionality of the system",
9657
"depends_on": [
97-
"cpp_supervised_app",
98-
"rust_supervised_app",
9958
"state_manager"
10059
],
10160
"recovery_action": {

0 commit comments

Comments
 (0)