-
Notifications
You must be signed in to change notification settings - Fork 42
chore(known_good): bump score_docs_as_code to preview the stakeholder requirements report #377
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
Open
antonkri
wants to merge
5
commits into
main
Choose a base branch
from
feat/platform-report-stakeholder-requirements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+614
−11
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
19b5172
chore(known_good): bump score_docs_as_code to the stakeholder require…
antonkri 4442ada
Add showcase-based platform integration tests linked to stakeholder reqs
antonkri aaca40f
refactor pits
antonkri 12d2179
chore(known_good): bump score_docs_as_code to the merged main commit
antonkri c3a6c7b
refactor(platform_integration_tests): split showcase tests into per-m…
antonkri 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Empty file.
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,57 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| load("@rules_python//python:defs.bzl", "py_library") | ||
|
|
||
| package(default_visibility = ["//platform_integration_tests:__subpackages__"]) | ||
|
|
||
| config_setting( | ||
| name = "config_linux_x86_64", | ||
| constraint_values = [ | ||
| "@platforms//os:linux", | ||
| "@platforms//cpu:x86_64", | ||
| "@score_bazel_platforms//runtime_es:posix", | ||
| ], | ||
| ) | ||
|
|
||
| config_setting( | ||
| name = "config_qnx_x86_64", | ||
| constraint_values = [ | ||
| "@platforms//os:qnx", | ||
| "@platforms//cpu:x86_64", | ||
| "@score_bazel_platforms//runtime_es:posix", | ||
| ], | ||
| ) | ||
|
|
||
| py_library( | ||
| name = "showcase_runner", | ||
| srcs = ["showcase_runner.py"], | ||
| # Lets sibling packages `import showcase_runner` as a flat top-level | ||
| # module instead of `platform_integration_tests.showcase_runner`. | ||
| imports = ["."], | ||
| ) | ||
|
|
||
| # Collects the per-module showcase tests below into the single suite that CI | ||
| # runs (see the top-level module docstring of each test for the rationale). | ||
| test_suite( | ||
| name = "pit", | ||
| tags = [ | ||
| "manual", | ||
| ], | ||
| tests = [ | ||
| "//platform_integration_tests/communication", | ||
| "//platform_integration_tests/kyron", | ||
| "//platform_integration_tests/lifecycle", | ||
| "//platform_integration_tests/logging", | ||
| "//platform_integration_tests/time", | ||
| ], | ||
| ) | ||
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,63 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| load("@score_itf//:defs.bzl", "py_itf_test") | ||
|
|
||
| py_itf_test( | ||
| name = "communication", | ||
| srcs = ["test_communication_showcase.py"], | ||
| args = select( | ||
| { | ||
| "//platform_integration_tests:config_linux_x86_64": [ | ||
| "--docker-image-bootstrap=$(location //images/linux_x86_64:image_load)", | ||
| "--docker-image=score_showcases:latest", | ||
| ], | ||
| "//platform_integration_tests:config_qnx_x86_64": [ | ||
| "--qemu-config=$(location //feature_integration_tests/configs:qemu_bridge_config.json)", | ||
| "--qemu-image=$(location //images/qnx_x86_64:image)", | ||
| ], | ||
| }, | ||
| no_match_error = "Unsupported platform", | ||
| ), | ||
| data = select({ | ||
| "//platform_integration_tests:config_linux_x86_64": [ | ||
| "//images/linux_x86_64:image_load", | ||
| ], | ||
| "//platform_integration_tests:config_qnx_x86_64": [ | ||
| "//feature_integration_tests/configs:qemu_bridge_config.json", | ||
| "//images/qnx_x86_64:image", | ||
| ], | ||
| }), | ||
| plugins = select( | ||
| { | ||
| "//platform_integration_tests:config_linux_x86_64": [ | ||
| "@score_itf//score/itf/plugins:docker_plugin", | ||
| ], | ||
| "//platform_integration_tests:config_qnx_x86_64": [ | ||
| "@score_itf//score/itf/plugins:qemu_plugin", | ||
| ], | ||
| }, | ||
| no_match_error = "Unsupported platform", | ||
| ) + [ | ||
| # Records PartiallyVerifies (via the `@add_test_properties` decorator) | ||
| # into the JUnit XML. docs-as-code's source code linker turns those | ||
| # properties into `testlink` attributes on the referenced stakeholder | ||
| # requirement needs. | ||
| "@score_itf//score/itf/plugins:attribute_plugin", | ||
| ], | ||
| tags = [ | ||
| "manual", | ||
| ], | ||
| deps = [ | ||
| "//platform_integration_tests:showcase_runner", | ||
| ], | ||
| ) |
46 changes: 46 additions & 0 deletions
46
platform_integration_tests/communication/test_communication_showcase.py
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,46 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| """Platform integration test for the communication showcase. | ||
|
|
||
| These tests exercise the demo applications shipped in ``//showcases`` as | ||
| end-to-end platform integration tests. Each test drives one showcase on the | ||
| deployed target image through the showcase entrypoint | ||
| (``/showcases/bin/cli``) and asserts that it runs to completion. | ||
|
|
||
| Unlike the feature integration tests (which verify individual ``feat_req``), | ||
| these tests demonstrate platform-level capabilities and are therefore linked | ||
| to the stakeholder requirements (``stkh_req``) they partially verify via | ||
| ``@add_test_properties``. docs-as-code's source code linker turns those | ||
| properties into ``testlink`` attributes on the referenced requirement needs, | ||
| which surface in the "Stakeholder Requirements" chapter of the platform | ||
| verification report. | ||
|
|
||
| All such tests in this package are combined into a single suite by the | ||
| ``pit`` target in this package's ``BUILD`` file. | ||
| """ | ||
|
|
||
| from attribute_plugin import add_test_properties | ||
| from showcase_runner import run_showcases | ||
|
|
||
|
|
||
| @add_test_properties( | ||
| partially_verifies=["stkh_req__communication__inter_process"], | ||
| test_type="interface-test", | ||
| derivation_technique="requirements-analysis", | ||
| ) | ||
| def test_communication_showcase(target): | ||
| """The communication showcase exchanges data between a sender and a | ||
| receiver process, demonstrating inter-process communication on the | ||
| platform.""" | ||
|
|
||
| run_showcases(target, "Communication Sender Receiver Example") |
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,63 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| load("@score_itf//:defs.bzl", "py_itf_test") | ||
|
|
||
| py_itf_test( | ||
| name = "kyron", | ||
| srcs = ["test_async_runtime_showcase.py"], | ||
| args = select( | ||
| { | ||
| "//platform_integration_tests:config_linux_x86_64": [ | ||
| "--docker-image-bootstrap=$(location //images/linux_x86_64:image_load)", | ||
| "--docker-image=score_showcases:latest", | ||
| ], | ||
| "//platform_integration_tests:config_qnx_x86_64": [ | ||
| "--qemu-config=$(location //feature_integration_tests/configs:qemu_bridge_config.json)", | ||
| "--qemu-image=$(location //images/qnx_x86_64:image)", | ||
| ], | ||
| }, | ||
| no_match_error = "Unsupported platform", | ||
| ), | ||
| data = select({ | ||
| "//platform_integration_tests:config_linux_x86_64": [ | ||
| "//images/linux_x86_64:image_load", | ||
| ], | ||
| "//platform_integration_tests:config_qnx_x86_64": [ | ||
| "//feature_integration_tests/configs:qemu_bridge_config.json", | ||
| "//images/qnx_x86_64:image", | ||
| ], | ||
| }), | ||
| plugins = select( | ||
| { | ||
| "//platform_integration_tests:config_linux_x86_64": [ | ||
| "@score_itf//score/itf/plugins:docker_plugin", | ||
| ], | ||
| "//platform_integration_tests:config_qnx_x86_64": [ | ||
| "@score_itf//score/itf/plugins:qemu_plugin", | ||
| ], | ||
| }, | ||
| no_match_error = "Unsupported platform", | ||
| ) + [ | ||
| # Records PartiallyVerifies (via the `@add_test_properties` decorator) | ||
| # into the JUnit XML. docs-as-code's source code linker turns those | ||
| # properties into `testlink` attributes on the referenced stakeholder | ||
| # requirement needs. | ||
| "@score_itf//score/itf/plugins:attribute_plugin", | ||
| ], | ||
| tags = [ | ||
| "manual", | ||
| ], | ||
| deps = [ | ||
| "//platform_integration_tests:showcase_runner", | ||
| ], | ||
| ) |
38 changes: 38 additions & 0 deletions
38
platform_integration_tests/kyron/test_async_runtime_showcase.py
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,38 @@ | ||
| # ******************************************************************************* | ||
| # 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 | ||
| # ******************************************************************************* | ||
| """Platform integration test for the Kyron async runtime showcases. | ||
|
|
||
| See ``test_communication_showcase`` for background on these platform | ||
| integration tests. All such tests in this package are combined into a single | ||
| suite by the ``pit`` target in this package's ``BUILD`` file. | ||
| """ | ||
|
|
||
| from attribute_plugin import add_test_properties | ||
| from showcase_runner import run_showcases | ||
|
|
||
|
|
||
| @add_test_properties( | ||
| partially_verifies=["stkh_req__execution_model__processes"], | ||
| test_type="interface-test", | ||
| derivation_technique="requirements-analysis", | ||
| ) | ||
| def test_async_runtime_showcase(target): | ||
| """The Kyron showcases run asynchronous applications on the safe async | ||
| runtime, demonstrating the platform's process and task management.""" | ||
|
|
||
| run_showcases( | ||
| target, | ||
| "Kyron select example", | ||
| "Kyron safety task example", | ||
| "Kyron basic example", | ||
| ) |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once all Modules are splitted across files - create separate py_itf target as well. Finally collect all in single PIT test_suite