Skip to content

Commit 1a64508

Browse files
authored
Merge pull request #38 from qorix-group/MSP_update_main
Manual Update of Fork to Main
2 parents 96c8441 + 1432004 commit 1a64508

File tree

87 files changed

+3964
-1399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+3964
-1399
lines changed

.bazelrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ build --tool_java_runtime_version=remotejdk_17
2828
build --@score_baselibs//score/json:base_library=nlohmann
2929
build --@score_baselibs//score/mw/log/flags:KRemote_Logging=False
3030

31-
# ToDo: needed for "wrong" implicit dependencies
32-
build --@score-baselibs//score/json:base_library=nlohmann
33-
build --@score-baselibs//score/mw/log/flags:KRemote_Logging=False
31+
common --extra_toolchains=@gcc_toolchain//:host_gcc_12
3432

3533
# Clippy linting (enabled by default)
3634
build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect

.clang-format

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
BasedOnStyle: Google
2+
AccessModifierOffset: -2
3+
AllowAllParametersOfDeclarationOnNextLine: false
4+
AllowShortBlocksOnASingleLine: Empty
5+
AllowShortCaseLabelsOnASingleLine: false
6+
AllowShortEnumsOnASingleLine: false
7+
# Empty is required in AllowShortFunctionsOnASingleLine over Inline because Inline contradicts with AUTOSAR rule A7-1-7
8+
# Such rule is no longer existing in MISRA C++:2023, once we are fully migrated to MISRA C++:2023, switching to Inline
9+
# could be reconsidered
10+
AllowShortFunctionsOnASingleLine: Empty
11+
AllowShortIfStatementsOnASingleLine: Never
12+
AllowShortLambdasOnASingleLine: Empty
13+
AllowShortLoopsOnASingleLine: false
14+
BinPackArguments: false
15+
BinPackParameters: false
16+
BraceWrapping:
17+
AfterCaseLabel: true
18+
AfterClass: true
19+
AfterControlStatement: Always
20+
AfterEnum: true
21+
AfterFunction: true
22+
AfterNamespace: true
23+
AfterObjCDeclaration: true
24+
AfterStruct: true
25+
AfterUnion: true
26+
BeforeCatch: true
27+
BeforeElse: true
28+
IndentBraces: false
29+
BreakBeforeBraces: Custom
30+
ColumnLimit: 120
31+
DerivePointerAlignment: false
32+
IncludeBlocks: Preserve
33+
IncludeCategories:
34+
- Regex: '^(<|")(assert|complex|ctype|errno|fenv|float|inttypes|iso646|limits|locale|math|setjmp|signal|stdalign|stdargh|stdatomic|stdbool|stddef|stdint|stdio|stdlib|stdnoreturn|string|tgmath|threads|time|uchar|wchar|wctype)\.h(>|")$'
35+
Priority: 2
36+
- Regex: '^(<|")(cstdlib|csignal|csetjmp|cstdarg|typeinfo|typeindex|type_traits|bitset|functional|utility|ctime|chrono|cstddef|initializer_list|tuple|any|optional|variant|new|memory|scoped_allocator|memory_resource|climits|cfloat|cstdint|cinttypes|limits|exception|stdexcept|cassert|system_error|cerrno|cctype|cwctype|cstring|cwchar|cuchar|string|string_view|array|vector|deque|list|forward_list|set|map|unordered_set|unordered_map|stack|queue|algorithm|execution|teratorslibrary|iterator|cmath|complex|valarray|random|numeric|ratio|cfenv|iosfwd|ios|istream|ostream|iostream|fstream|sstream|strstream|iomanip|streambuf|cstdio|locale|clocale|codecvt|regex|atomic|thread|mutex|shared_mutex|future|condition_variable|filesystem|ciso646|ccomplex|ctgmath|cstdalign|cstdbool)(>|")$'
37+
Priority: 3
38+
- Regex: '^(<|").*(>|")$'
39+
Priority: 1
40+
IndentWidth: 4
41+
InsertNewlineAtEOF: true
42+
KeepEmptyLinesAtTheStartOfBlocks: true
43+
QualifierAlignment: Left
44+
CommentPragmas: '^.*A2Lfactory:'
45+
---
46+
# Make sure language specific settings are below the generic settings to be compatible to all languages.
47+
Language: Cpp
48+
Standard: c++17

.devcontainer/devcontainer.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
11
{
22
"name": "eclipse-s-core",
3-
"image": "ghcr.io/eclipse-score/devcontainer:1.0.0",
4-
"features": {
5-
"ghcr.io/devcontainers/features/rust:1.5.0": {
6-
"version": "1.83.0",
7-
"components": [
8-
"cargo",
9-
"clippy",
10-
// "miri", // only available at nightly
11-
// "rust-analyzer", // already provided by the image
12-
"rust-src",
13-
"rustfmt"
14-
]
15-
}
16-
}
3+
"image": "ghcr.io/eclipse-score/devcontainer:v1.1.0"
174
}

.github/workflows/check.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- uses: dtolnay/rust-toolchain@stable
3535
with:
36-
toolchain: 1.83.0
36+
toolchain: 1.90.0
3737
components: clippy, rustfmt
3838

3939
- name: Cargo Clippy
@@ -57,7 +57,7 @@ jobs:
5757

5858
- uses: dtolnay/rust-toolchain@stable
5959
with:
60-
toolchain: nightly-2024-12-17
60+
toolchain: nightly-2025-12-15
6161
components: miri, rust-src
6262

6363
- name: Install Clang
@@ -67,7 +67,7 @@ jobs:
6767
6868
- name: Cargo Miri
6969
run: |
70-
cargo +nightly-2024-12-17 miri test
70+
cargo +nightly-2025-12-15 miri test
7171
7272
cargo-coverage:
7373
runs-on: ubuntu-latest
@@ -76,16 +76,16 @@ jobs:
7676

7777
- uses: dtolnay/rust-toolchain@stable
7878
with:
79-
toolchain: nightly-2024-12-17
79+
toolchain: nightly-2025-12-15
8080
components: llvm-tools-preview, rust-src
8181

8282
- name: Install cargo-llvm-cov
8383
run: |
84-
cargo +nightly-2024-12-17 install cargo-llvm-cov --locked
84+
cargo +nightly-2025-12-15 install cargo-llvm-cov --locked
8585
8686
- name: Cargo llvm-cov
8787
run: |
88-
cargo +nightly-2024-12-17 llvm-cov --branch --tests --lib
88+
cargo +nightly-2025-12-15 llvm-cov --branch --tests --lib
8989
9090
rust-bazel:
9191
runs-on: ubuntu-latest

.github/workflows/component_integration_tests.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020
- main
2121
merge_group:
2222
types: [checks_requested]
23+
workflow_call:
2324

2425
jobs:
2526
component-integration-tests:
@@ -28,13 +29,21 @@ jobs:
2829
run:
2930
shell: bash
3031
steps:
32+
- name: Checkout repository (pull_request_target via workflow_call)
33+
if: ${{ github.event_name == 'pull_request_target' }}
34+
uses: actions/checkout@v4
35+
with:
36+
ref: ${{ github.head_ref || github.event.pull_request.head.ref || github.ref }}
37+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
38+
3139
- name: Checkout repository
40+
if: ${{ github.event_name != 'pull_request_target' }}
3241
uses: actions/checkout@v4
3342

3443
- name: Setup Rust build environment
3544
uses: dtolnay/rust-toolchain@stable
3645
with:
37-
toolchain: 1.83.0
46+
toolchain: 1.90.0
3847

3948
- name: Setup Bazel
4049
uses: bazel-contrib/setup-bazel@0.15.0
@@ -46,26 +55,44 @@ jobs:
4655

4756
- name: Build C++ test scenarios with Bazel
4857
run: |
49-
bazel build --config=per-x86_64-linux //tests/cpp_test_scenarios:cpp_test_scenarios
58+
bazel build --config=per-x86_64-linux //tests/test_scenarios/cpp:test_scenarios
5059
5160
- name: Build Rust test scenarios with Bazel
5261
run: |
53-
bazel build //tests/rust_test_scenarios:rust_test_scenarios
62+
bazel build //tests/test_scenarios/rust:test_scenarios
5463
5564
- name: Set up Python 3
5665
uses: actions/setup-python@v5
5766
with:
5867
python-version: '3.12'
5968

6069
- name: Set up Python virtual environment
61-
working-directory: tests/python_test_cases
6270
run: |
6371
python -m venv .venv
6472
source .venv/bin/activate
65-
pip install .
73+
pip install -r tests/test_cases/requirements.txt
6674
6775
- name: Run Python tests with pytest
68-
working-directory: tests/python_test_cases
6976
run: |
7077
source .venv/bin/activate
71-
python -m pytest
78+
python -m pytest --traces=all
79+
80+
- name: Run Python tests with bazel
81+
run: |
82+
bazel test //tests/test_cases:cit
83+
84+
- name: Prepare test reports
85+
if: always()
86+
# Creating tests-report directory
87+
# Follow Symlinks via '-L' to copy correctly
88+
# Copy everything inside the 'test-reports' folder
89+
run: |
90+
mkdir -p tests-report
91+
rsync -amL --include='*/' --include='test.xml' --include='test.log' --exclude='*' bazel-testlogs/ tests-report/
92+
93+
- name: Upload bundled test report
94+
if: always()
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: tests-report
98+
path: tests-report

.github/workflows/docs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,21 @@ on:
2929
types: [checks_requested]
3030

3131
jobs:
32+
docs-verify:
33+
uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@main
34+
permissions:
35+
pull-requests: write
36+
contents: read
37+
with:
38+
bazel-docs-verify-target: "//:docs_check"
39+
40+
cit-tests:
41+
uses: ./.github/workflows/component_integration_tests.yml
42+
secrets: inherit
43+
3244
build-docs:
45+
needs: [docs-verify, cit-tests] # Test reports are needed for traceability links
46+
if: ${{ always() && needs.docs-verify.result == 'success' }}
3347
uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@main
3448
permissions:
3549
contents: write
@@ -40,3 +54,4 @@ jobs:
4054
with:
4155
bazel-target: "//:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}"
4256
retention-days: 3
57+
tests-report-artifact: tests-report

.github/workflows/release.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
types: [created]
1818

1919
jobs:
20-
archive-report:
20+
release-verification:
2121
runs-on: ubuntu-latest
2222
permissions:
2323
contents: write # required to upload release assets
@@ -60,13 +60,30 @@ jobs:
6060
6161
- name: Build via Bazel
6262
run: |
63-
echo "Running: bazel build //src/..."
64-
bazel build //src/...
63+
echo "Running: bazel build --config=per-x86_64-linux //src/..."
64+
bazel build --config=per-x86_64-linux //src/...
6565
6666
- name: Run Unit Tests via Bazel
6767
run: |
68-
echo "Running: bazel test //:unit_tests"
69-
bazel test //:unit_tests
68+
echo "Running: bazel test --config=per-x86_64-linux //:unit_tests"
69+
bazel test --config=per-x86_64-linux //:unit_tests
70+
71+
- name: Run Unit Test with Coverage for Rust
72+
run: |
73+
# Run tests
74+
bazel coverage --config=per-x86_64-linux //:unit_tests \
75+
--collect_code_coverage \
76+
--combined_report=lcov \
77+
--experimental_generate_llvm_lcov \
78+
--nocache_test_results \
79+
--nostamp
80+
# Generate HTML report
81+
genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat" \
82+
-o=rust_coverage \
83+
--show-details \
84+
--legend \
85+
--function-coverage \
86+
--branch-coverage
7087
7188
- name: Run Unit Test with Coverage for C++
7289
run: |
@@ -87,24 +104,8 @@ jobs:
87104
--show-details \
88105
--legend \
89106
--function-coverage \
90-
--branch-coverage
91-
92-
- name: Run Unit Test with Coverage for Rust
93-
run: |
94-
# Run tests
95-
bazel coverage //:unit_tests_rust \
96-
--collect_code_coverage \
97-
--combined_report=lcov \
98-
--experimental_generate_llvm_lcov \
99-
--nocache_test_results \
100-
--nostamp
101-
# Generate HTML report
102-
genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat" \
103-
-o=rust_coverage \
104-
--show-details \
105-
--legend \
106-
--function-coverage \
107-
--branch-coverage
107+
--branch-coverage \
108+
--ignore-errors=unmapped
108109
109110
- name: Create archive of test report
110111
run: |

BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ test_suite(
129129
test_suite(
130130
name = "cit_tests",
131131
tests = [
132-
"//tests/python_test_cases:cit_cpp",
133-
"//tests/python_test_cases:cit_rust",
132+
"//tests/test_cases:cit_cpp",
133+
"//tests/test_cases:cit_rust",
134134
],
135135
visibility = ["//visibility:public"],
136136
)

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resolver = "2"
33
members = [
44
"src/rust/rust_kvs",
55
"src/rust/rust_kvs_tool",
6-
"tests/rust_test_scenarios",
6+
"tests/test_scenarios/rust",
77
]
88

99

0 commit comments

Comments
 (0)