Skip to content

Commit c3c1d5e

Browse files
committed
scorebug issue resolved
1 parent c52c008 commit c3c1d5e

4 files changed

Lines changed: 3 additions & 62 deletions

File tree

feature_integration_tests/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,13 @@ bazel run //feature_integration_tests/test_scenarios/rust:rust_test_scenarios --
4848
bazel test --config=linux-x86_64 //feature_integration_tests/test_cases:fit --test_output=streamed
4949
```
5050

51-
The Rust side of this lifecycle-only suite uses a dedicated Bazel target,
52-
`//feature_integration_tests/test_scenarios/rust:rust_lifecycle_test_scenarios`,
53-
which still reuses `test_scenarios/rust/src/main.rs`. It is built with the
54-
`lifecycle_only` cfg so only lifecycle scenarios are compiled for that suite,
55-
while the normal `fit` and `fit_rust` targets continue to use the full scenario tree.
56-
5751
To run the lifecycle tests directly with `pytest` and build the scenario binaries on demand:
5852

5953
```sh
6054
python3 -m pytest feature_integration_tests/test_cases/tests/lifecycle/ \
6155
--build-scenarios \
6256
-m rust \
63-
--rust-target-name=//feature_integration_tests/test_scenarios/rust:rust_lifecycle_test_scenarios \
57+
--rust-target-name=//feature_integration_tests/test_scenarios/rust:rust_test_scenarios \
6458
-q -v
6559

6660
python3 -m pytest feature_integration_tests/test_cases/tests/lifecycle/ \

feature_integration_tests/test_cases/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ score_py_pytest(
8888
args = [
8989
"-m rust",
9090
"--traces=all",
91-
"--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_lifecycle_test_scenarios)",
91+
"--rust-target-path=$(rootpath //feature_integration_tests/test_scenarios/rust:rust_test_scenarios)",
9292
],
9393
data = [
9494
"conftest.py",
9595
"fit_scenario.py",
9696
"lifecycle_scenario.py",
9797
"test_properties.py",
98-
"//feature_integration_tests/test_scenarios/rust:rust_lifecycle_test_scenarios",
98+
"//feature_integration_tests/test_scenarios/rust:rust_test_scenarios",
9999
],
100100
env = {
101101
"RUST_BACKTRACE": "1",

feature_integration_tests/test_scenarios/rust/BUILD

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,3 @@ rust_binary(
3232
"@score_test_scenarios//test_scenarios_rust",
3333
],
3434
)
35-
36-
rust_binary(
37-
name = "rust_lifecycle_test_scenarios",
38-
srcs = [
39-
"src/main.rs",
40-
"src/scenarios/lifecycle/conditional_launching.rs",
41-
"src/scenarios/lifecycle/mod.rs",
42-
],
43-
crate_root = "src/main.rs",
44-
# Build the lifecycle-only Rust FIT from the same main.rs entrypoint.
45-
# This target is a temporary workaround for the unresolved ScoreDebug
46-
# dependency in score_persistency/rust_kvs.
47-
# Tracking issue: https://github.com/eclipse-score/persistency/issues/375
48-
# Remove this target when the issue is fixed upstream.
49-
rustc_flags = ["--cfg=lifecycle_only"],
50-
tags = [
51-
"manual",
52-
],
53-
visibility = ["//visibility:public"],
54-
deps = [
55-
"@score_crates//:serde_json",
56-
"@score_crates//:tracing",
57-
"@score_crates//:tracing_subscriber",
58-
"@score_test_scenarios//test_scenarios_rust",
59-
],
60-
)

feature_integration_tests/test_scenarios/rust/src/main.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,12 @@
1111
// SPDX-License-Identifier: Apache-2.0
1212
// *******************************************************************************
1313

14-
// The normal FIT binary builds the full scenario tree, which includes persistency
15-
// scenarios and their transitive dependencies.
16-
#[cfg(not(lifecycle_only))]
1714
mod internals;
18-
#[cfg(not(lifecycle_only))]
1915
mod scenarios;
20-
// The lifecycle-only build reuses this same entrypoint but limits compilation to
21-
// lifecycle scenarios. This is needed because the conditional-launching FIT only
22-
// exercises lifecycle behavior, while the full Rust FIT binary currently pulls in
23-
// score_persistency/rust_kvs where ScoreDebug-related path logging compilation
24-
// issues are still unresolved upstream.
25-
#[cfg(lifecycle_only)]
26-
#[path = "scenarios/lifecycle/mod.rs"]
27-
mod lifecycle;
2816

2917
use test_scenarios_rust::cli::run_cli_app;
3018
use test_scenarios_rust::test_context::TestContext;
3119

32-
#[cfg(lifecycle_only)]
33-
use crate::lifecycle::lifecycle_group;
34-
#[cfg(lifecycle_only)]
35-
use test_scenarios_rust::scenario::{ScenarioGroup, ScenarioGroupImpl};
36-
// The default build keeps the existing root scenario registration for the full FIT suite.
37-
#[cfg(not(lifecycle_only))]
3820
use crate::scenarios::root_scenario_group;
3921
use std::time::{SystemTime, UNIX_EPOCH};
4022
use tracing::Level;
@@ -61,15 +43,6 @@ fn init_tracing_subscriber() {
6143
tracing::subscriber::set_global_default(subscriber).expect("Setting default subscriber failed!");
6244
}
6345

64-
// In lifecycle-only mode we construct a reduced root group from the same main.rs
65-
// entrypoint instead of introducing a second Rust binary entry source. This keeps
66-
// the folder layout and normal FIT execution unchanged while providing a stable
67-
// workaround until the ScoreDebug issue is fixed in score_persistency.
68-
#[cfg(lifecycle_only)]
69-
fn root_scenario_group() -> Box<dyn ScenarioGroup> {
70-
Box::new(ScenarioGroupImpl::new("root", vec![], vec![lifecycle_group()]))
71-
}
72-
7346
fn main() -> Result<(), String> {
7447
let raw_arguments: Vec<String> = std::env::args().collect();
7548

0 commit comments

Comments
 (0)