Skip to content

Commit ac2464e

Browse files
authored
Merge pull request eclipse-score#26 from qorix-group/prabakaran_bazel_remove_cargo_deps
bazel: Remove usage of .from_cargo in bzlmod
2 parents 3d040cb + 9b44126 commit ac2464e

File tree

30 files changed

+175
-214
lines changed

30 files changed

+175
-214
lines changed

BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ copyright_checker(
2727
"component_integration_tests",
2828
"docs",
2929
"internal_docs",
30-
"patches",
3130
"scripts",
3231
"src",
3332
"tests",

Cargo.lock

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@ alloc_instead_of_core = "warn"
7878

7979

8080
[workspace.lints.rust]
81-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }
81+
unexpected_cfgs = { level = "warn", check-cfg = [
82+
'cfg(feature, values("bazel_build_iceoryx2_qnx8"))',
83+
'cfg(loom)',
84+
] }

MODULE.bazel

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,18 @@ bazel_dep(name = "custom_qemu", version = "1.0.0", dev_dependency = True)
4545

4646
bazel_dep(name = "googletest", version = "1.14.0")
4747

48+
bazel_dep(name = "score_test_scenarios", version = "0.3.1", dev_dependency = True)
49+
50+
# S-CORE crates
51+
bazel_dep(name = "score_crates")
52+
4853
# Overrides
54+
git_override(
55+
module_name = "score_test_scenarios",
56+
commit = "2367017e92a65cf4dd2cebeee6d6db3b4d6a1447",
57+
remote = "https://github.com/qorix-group/testing_tools.git",
58+
)
59+
4960
git_override(
5061
module_name = "score_platform",
5162
commit = "bcab25561cdce7bd4eeebdb20b0ba4e2a4becc12",
@@ -70,6 +81,12 @@ git_override(
7081
remote = "https://github.com/qorix-group/score_virtualization.git",
7182
)
7283

84+
git_override(
85+
module_name = "score_crates",
86+
commit = "dcbc6a4d36c9293549397893650c3a7068b0682d",
87+
remote = "https://github.com/eclipse-score/score-crates.git",
88+
)
89+
7390
archive_override(
7491
module_name = "rust_qnx8_toolchain",
7592
strip_prefix = "qnx8",
@@ -140,44 +157,3 @@ register_toolchains(
140157
"@toolchains_qnx_ifs//:ifs_aarch64",
141158
dev_dependency = True,
142159
)
143-
144-
# Module deps
145-
146-
# Crate configs
147-
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
148-
crate.from_cargo(
149-
name = "score_kyron_crates",
150-
cargo_lockfile = "//:Cargo.lock",
151-
manifests = [
152-
"//:Cargo.toml",
153-
"//:src/kyron-foundation/Cargo.toml",
154-
"//:src/kyron/Cargo.toml",
155-
"//src/kyron-macros:Cargo.toml",
156-
"//:src/kyron-testing/Cargo.toml",
157-
"//src/kyron-testing-macros:Cargo.toml",
158-
"//:src/logging_tracing/Cargo.toml",
159-
"//:src/xtask/Cargo.toml",
160-
"//component_integration_tests/rust_test_scenarios:Cargo.toml",
161-
],
162-
163-
# This shall not be here but rules_rust 0.61.0 or even 0.67.0 does not correct finds out that when we use out platform it shall append
164-
# aarch64-unknown-nto-qnx710 or best aarch64-unknown-nto-qnx800 which is not fully supported in any rust_rules version for now (even if rustc 1.86.0 already supports it)
165-
supported_platform_triples = [
166-
"aarch64-unknown-nto-qnx710", # This enables also QNX8 becasue OS and CPU for platform matches....
167-
"x86_64-unknown-linux-gnu",
168-
"x86_64-unknown-none",
169-
],
170-
)
171-
crate.annotation(
172-
crate = "iceoryx2-bb-derive-macros",
173-
patches = ["//patches:iceoryx2_bb_derive_macros_readme.patch"],
174-
repositories = ["score_kyron_crates"],
175-
)
176-
177-
#iceoryx2 does not yet support QNX8 correctly
178-
crate.annotation(
179-
crate = "iceoryx2-pal-posix",
180-
patches = ["//patches:qnx8_iceoryx2.patch"],
181-
repositories = ["score_kyron_crates"],
182-
)
183-
use_repo(crate, "score_kyron_crates")

component_integration_tests/python_test_cases/pytest.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ markers =
2222
root_required: root permissions are required for this test.
2323
do_not_repeat: do not repeat this test when using pytest-repeat.
2424
only_nightly: run this test only in nightly runs.
25+
26+
filterwarnings =
27+
ignore::pytest.PytestWarning
28+
ignore::pytest.PytestExperimentalApiWarning

component_integration_tests/python_test_cases/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def pytest_runtest_makereport(item, call):
229229
command.append(token)
230230
report.command = " ".join(command)
231231
# If bazel is used, modify command
232-
if "BAZEL_VERSION" in os.environ:
232+
if "BAZEL_TEST" in os.environ:
233233
report.command = report.command.replace(
234234
"component_integration_tests/rust_test_scenarios/rust_test_scenarios",
235235
"bazel run //component_integration_tests/rust_test_scenarios:rust_test_scenarios --",

component_integration_tests/rust_test_scenarios/BUILD

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313
load("@rules_rust//rust:defs.bzl", "rust_binary")
14-
load("@score_kyron_crates//:defs.bzl", "all_crate_deps")
1514

1615
rust_binary(
1716
name = "rust_test_scenarios",
@@ -23,7 +22,12 @@ rust_binary(
2322
deps = [
2423
"//src/kyron:libkyron",
2524
"//src/kyron-foundation:libkyron_foundation",
26-
] + all_crate_deps(
27-
normal = True,
28-
),
25+
"@score_crates//:futures",
26+
"@score_crates//:libc",
27+
"@score_crates//:serde",
28+
"@score_crates//:serde_json",
29+
"@score_crates//:tracing",
30+
"@score_crates//:tracing_subscriber",
31+
"@score_test_scenarios//test_scenarios_rust",
32+
],
2933
)

component_integration_tests/rust_test_scenarios/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ libc.workspace = true
1212
futures = "0.3.31"
1313
serde = { version = "1.0.219", features = ["derive"] }
1414
serde_json = "1.0.140"
15-
test_scenarios_rust = { git = "https://github.com/eclipse-score/testing_tools.git", tag = "v0.3.0" }
15+
test_scenarios_rust = { git = "https://github.com/qorix-group/testing_tools.git", rev = "2367017e92a65cf4dd2cebeee6d6db3b4d6a1447" }
1616

1717
[lints.clippy]
1818
unwrap_used = "deny"

component_integration_tests/rust_test_scenarios/src/main.rs

100755100644
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
mod internals;
22
mod tests;
33

4-
use test_scenarios_rust::cli::run_cli_app;
4+
use test_scenarios_rust::cli::{create_tracing_subscriber, run_cli_app};
55
use test_scenarios_rust::test_context::TestContext;
66

77
use crate::tests::root_scenario_group;
88

99
fn main() -> Result<(), String> {
10+
let subscriber = create_tracing_subscriber();
11+
tracing::subscriber::set_global_default(subscriber).expect("Setting default subscriber failed!");
12+
1013
let raw_arguments: Vec<String> = std::env::args().collect();
1114

1215
// Root group.

patches/BUILD

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)