From 19b51726ca9ffe92324a65c1056a856135a5f438 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Tue, 29 Sep 2026 12:22:45 +0000 Subject: [PATCH 1/5] chore(known_good): bump score_docs_as_code to the stakeholder requirements report Pins score_docs_as_code to a26274882b0ff41187e502c7bcdd26bbf5858232, which adds the "Stakeholder Requirements" chapter to the platform verification report template (eclipse-score/docs-as-code#875). main pins score_docs_as_code to the released version 8.3.0, but that release does not yet contain the stakeholder requirements chapter (the pinned commit is two commits ahead of v8.3.0). Until a release containing it exists, this overrides to the git commit via git_override instead of single_version_override. Regenerated bazel_common/score_modules_tooling.MODULE.bazel accordingly and updated MODULE.bazel.lock via `bazel mod tidy` to drop the score_docs_as_code 8.3.0 registry entries that no longer apply under the git_override. --- MODULE.bazel.lock | 2 -- bazel_common/score_modules_tooling.MODULE.bazel | 5 +++-- known_good.json | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index df3690d5747..e6ef672d947 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1013,8 +1013,6 @@ "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/rules_swift/2.1.1/MODULE.bazel": "not found", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.11.1/MODULE.bazel": "a4d27e121bdee44906e0eac49a74427446482ce16158827802b29c7c3d378150", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_devcontainer/1.11.1/source.json": "0be271286a80b5554628884b1835d6a7b95ce8b9586b572600da95b6c57be428", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/8.3.0/MODULE.bazel": "d1fc8b8a089f3bef6e50ab83abb3ae6ba766451e84f749e9c5e87c4b27ff508a", - "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_docs_as_code/8.3.0/source.json": "c18aecf1eab38b7ba30f8c9f8c1eb5517f7b88c38c7d57d896851a21e382e5f7", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_format_checker/0.1.1/MODULE.bazel": "1acc254faa90e9f97b79ac69af25b6c21c561f8d6079914f6352b9b20d26bd37", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_format_checker/0.1.1/source.json": "e3d10be878d1a007967b75a5c6d9c3ec3d47c320685904b7f31c689b3cbcdb3a", "https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/modules/score_process/2.0.2/MODULE.bazel": "6d2b227bb6880e9f6871cc8cf94c83399e35c188424f7e9b826262de8149ed43", diff --git a/bazel_common/score_modules_tooling.MODULE.bazel b/bazel_common/score_modules_tooling.MODULE.bazel index 5cab525d068..60bc687d8c2 100644 --- a/bazel_common/score_modules_tooling.MODULE.bazel +++ b/bazel_common/score_modules_tooling.MODULE.bazel @@ -65,9 +65,10 @@ git_override( ) bazel_dep(name = "score_docs_as_code") -single_version_override( +git_override( module_name = "score_docs_as_code", - version = "8.3.0", + commit = "a26274882b0ff41187e502c7bcdd26bbf5858232", + remote = "https://github.com/eclipse-score/docs-as-code.git", ) bazel_dep(name = "score_process_description") diff --git a/known_good.json b/known_good.json index 8bfe28a313d..db29573c483 100644 --- a/known_good.json +++ b/known_good.json @@ -212,7 +212,7 @@ }, "score_docs_as_code": { "repo": "https://github.com/eclipse-score/docs-as-code.git", - "version": "8.3.0" + "hash": "a26274882b0ff41187e502c7bcdd26bbf5858232" }, "score_process_description": { "repo": "https://github.com/eclipse-score/process_description.git", From 4442adafd68b90758c2c63677b84ca41779e42fc Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Tue, 29 Sep 2026 15:16:38 +0000 Subject: [PATCH 2/5] Add showcase-based platform integration tests linked to stakeholder reqs Stakeholder requirements are platform-level and should be verified by platform-level tests, not by the feature integration tests (which verify individual `feat_req`). The `//showcases` demo applications are exactly such platform-level scenarios, so reference them as platform integration tests instead of rewriting them: * Add `platform_integration_tests/` with a `py_itf_test` that drives each showcase on the deployed target image (Docker on linux-x86_64) through the showcase entrypoint `/showcases/bin/cli` and asserts it runs to completion. * Annotate each test with `@add_test_properties(partially_verifies=[...])` pointing at the stakeholder requirement the showcase demonstrates (communication, logging, execution model, health management, vehicle time). `py_itf_test` does not register `attribute_plugin` (unlike `score_py_pytest`), so it is wired up in the BUILD file. * Run `//platform_integration_tests:pit` in the `test_and_docs` workflow, before the documentation build, so the source code linker picks up the testlinks from `bazel-testlogs` and the platform verification report shows the coverage. --- .github/workflows/test_and_docs.yml | 13 ++ images/linux_x86_64/BUILD | 1 + platform_integration_tests/.gitkeep | 0 platform_integration_tests/BUILD | 86 +++++++++++++ platform_integration_tests/test_showcases.py | 123 +++++++++++++++++++ 5 files changed, 223 insertions(+) delete mode 100644 platform_integration_tests/.gitkeep create mode 100644 platform_integration_tests/BUILD create mode 100644 platform_integration_tests/test_showcases.py diff --git a/.github/workflows/test_and_docs.yml b/.github/workflows/test_and_docs.yml index ea7d1f21c5c..509bb593f30 100644 --- a/.github/workflows/test_and_docs.yml +++ b/.github/workflows/test_and_docs.yml @@ -52,6 +52,10 @@ jobs: - name: Checkout repository if: ${{ github.event_name != 'pull_request_target' }} uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up Docker Buildx + # Required by the platform integration tests below, which run the + # showcases against a Docker target built from //images/linux_x86_64:image. + uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0 - name: Setup Bazel uses: bazel-contrib/setup-bazel@0.18.0 with: @@ -99,6 +103,15 @@ jobs: - name: Execute Feature Integration Tests run: | bazel test --config=linux-x86_64 //feature_integration_tests/test_cases:fit + - name: Execute Platform Integration Tests + # Runs in this job - and before the documentation build below - on purpose: + # the source code linker of the documentation build scans `bazel-testlogs` + # of this very workspace. Only tests executed here contribute their + # PartiallyVerifies/FullyVerifies properties as `testlink` attributes to + # the stakeholder requirement needs, and therefore to the test coverage + # figures of the platform verification report. + run: | + bazel test --lockfile_mode=error --config=linux-x86_64 //platform_integration_tests:pit - name: Install uv (required for SBOM license scanning) uses: astral-sh/setup-uv@v5 with: diff --git a/images/linux_x86_64/BUILD b/images/linux_x86_64/BUILD index 3eee222f6d6..34f1a51defd 100644 --- a/images/linux_x86_64/BUILD +++ b/images/linux_x86_64/BUILD @@ -63,5 +63,6 @@ oci_load( repo_tags = ["score_showcases:latest"], visibility = [ "//feature_integration_tests/itf:__pkg__", + "//platform_integration_tests:__pkg__", ], ) diff --git a/platform_integration_tests/.gitkeep b/platform_integration_tests/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/platform_integration_tests/BUILD b/platform_integration_tests/BUILD new file mode 100644 index 00000000000..0b17fa11b06 --- /dev/null +++ b/platform_integration_tests/BUILD @@ -0,0 +1,86 @@ +# ******************************************************************************* +# 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") + +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_itf_test( + name = "pit", + srcs = [ + "test_showcases.py", + ], + args = select( + { + ":config_linux_x86_64": [ + "--docker-image-bootstrap=$(location //images/linux_x86_64:image_load)", + "--docker-image=score_showcases:latest", + ], + ":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", + ) + [ + # Enables the `@add_test_properties` decorator used by the tests to + # record PartiallyVerifies into the JUnit XML. docs-as-code's source + # code linker turns those properties into `testlink` attributes on the + # referenced stakeholder requirement needs. `py_itf_test` does not + # register the plugin itself (unlike `score_py_pytest`), so it is wired + # up here. + "-p", + "attribute_plugin", + ], + data = select({ + ":config_linux_x86_64": [ + "//images/linux_x86_64:image_load", + ], + ":config_qnx_x86_64": [ + "//feature_integration_tests/configs:qemu_bridge_config.json", + "//images/qnx_x86_64:image", + ], + }), + plugins = select( + { + ":config_linux_x86_64": [ + "@score_itf//score/itf/plugins:docker_plugin", + ], + ":config_qnx_x86_64": [ + "@score_itf//score/itf/plugins:qemu_plugin", + ], + }, + no_match_error = "Unsupported platform", + ), + tags = [ + "manual", + ], + deps = [ + "@score_tooling//python_basics/score_pytest:attribute_plugin", + ], +) diff --git a/platform_integration_tests/test_showcases.py b/platform_integration_tests/test_showcases.py new file mode 100644 index 00000000000..08b1da5824e --- /dev/null +++ b/platform_integration_tests/test_showcases.py @@ -0,0 +1,123 @@ +# ******************************************************************************* +# 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 tests. + +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. +""" + +import logging + +from attribute_plugin import add_test_properties + +logger = logging.getLogger(__name__) + +_CLI = "/showcases/bin/cli" + + +def _run_showcases(target, *names: str) -> None: + """Run the named showcases via the showcase entrypoint and assert success. + + ``run_score`` in the showcase CLI prints a per-example completion banner + and exits 0 once every app of an example has been spawned and joined, so + both the exit code and the banner are checked to confirm the showcase ran + end-to-end on the platform. + """ + selection = ",".join(names) + exit_code, out = target.execute(f"{_CLI} --examples='{selection}'") + output = out.decode(errors="replace") + logger.info(output) + assert exit_code == 0, f"Showcase CLI exited with {exit_code}:\n{output}" + for name in names: + assert f"Example '{name}' finished successfully" in output, ( + f"Showcase '{name}' did not finish successfully:\n{output}" + ) + + +@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") + + +@add_test_properties( + partially_verifies=["stkh_req__dev_experience__logging_support"], + test_type="interface-test", + derivation_technique="requirements-analysis", +) +def test_logging_showcase(target): + """The logging showcase runs an application logging via ``mw::log`` with + the console, remote (DLT) and file backends, demonstrating the platform's + logging support.""" + + _run_showcases(target, "LoggingApp Demo") + + +@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", + ) + + +@add_test_properties( + partially_verifies=["stkh_req__dependability__safety_features_1"], + test_type="interface-test", + derivation_technique="requirements-analysis", +) +def test_lifecycle_showcase(target): + """The lifecycle showcase launches two supervised applications and records + a malfunction, demonstrating the platform's health and lifecycle + management.""" + + _run_showcases(target, "Simple Health and lifecycle management example") + + +@add_test_properties( + partially_verifies=["stkh_req__time__vehicle_time_api"], + test_type="interface-test", + derivation_technique="requirements-analysis", +) +def test_vehicle_time_showcase(target): + """The vehicle time showcase obtains a combined snapshot of the + PTP-synchronized vehicle time and the local monotonic time, demonstrating + the platform's vehicle time base API.""" + + _run_showcases(target, "Vehicle Time Example") From aaca40f41ea888989810bd191277e2b2cc26a884 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Wed, 30 Sep 2026 11:02:59 +0000 Subject: [PATCH 3/5] refactor pits --- platform_integration_tests/BUILD | 29 ++--- platform_integration_tests/showcase_runner.py | 38 ++++++ .../test_async_runtime_showcase.py | 38 ++++++ .../test_communication_showcase.py | 46 +++++++ .../test_lifecycle_showcase.py | 34 +++++ .../test_logging_showcase.py | 34 +++++ platform_integration_tests/test_showcases.py | 123 ------------------ .../test_vehicle_time_showcase.py | 34 +++++ 8 files changed, 238 insertions(+), 138 deletions(-) create mode 100644 platform_integration_tests/showcase_runner.py create mode 100644 platform_integration_tests/test_async_runtime_showcase.py create mode 100644 platform_integration_tests/test_communication_showcase.py create mode 100644 platform_integration_tests/test_lifecycle_showcase.py create mode 100644 platform_integration_tests/test_logging_showcase.py delete mode 100644 platform_integration_tests/test_showcases.py create mode 100644 platform_integration_tests/test_vehicle_time_showcase.py diff --git a/platform_integration_tests/BUILD b/platform_integration_tests/BUILD index 0b17fa11b06..041879c8255 100644 --- a/platform_integration_tests/BUILD +++ b/platform_integration_tests/BUILD @@ -33,7 +33,12 @@ config_setting( py_itf_test( name = "pit", srcs = [ - "test_showcases.py", + "showcase_runner.py", + "test_async_runtime_showcase.py", + "test_communication_showcase.py", + "test_lifecycle_showcase.py", + "test_logging_showcase.py", + "test_vehicle_time_showcase.py", ], args = select( { @@ -47,16 +52,7 @@ py_itf_test( ], }, no_match_error = "Unsupported platform", - ) + [ - # Enables the `@add_test_properties` decorator used by the tests to - # record PartiallyVerifies into the JUnit XML. docs-as-code's source - # code linker turns those properties into `testlink` attributes on the - # referenced stakeholder requirement needs. `py_itf_test` does not - # register the plugin itself (unlike `score_py_pytest`), so it is wired - # up here. - "-p", - "attribute_plugin", - ], + ), data = select({ ":config_linux_x86_64": [ "//images/linux_x86_64:image_load", @@ -76,11 +72,14 @@ py_itf_test( ], }, 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 = [ - "@score_tooling//python_basics/score_pytest:attribute_plugin", - ], ) diff --git a/platform_integration_tests/showcase_runner.py b/platform_integration_tests/showcase_runner.py new file mode 100644 index 00000000000..9b8ced60119 --- /dev/null +++ b/platform_integration_tests/showcase_runner.py @@ -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 +# ******************************************************************************* +"""Helper for driving showcases via the showcase CLI entrypoint.""" + +import logging + +logger = logging.getLogger(__name__) + +_CLI = "/showcases/bin/cli" + + +def run_showcases(target, *names: str) -> None: + """Run the named showcases via the showcase entrypoint and assert success. + + ``run_score`` in the showcase CLI prints a per-example completion banner + and exits 0 once every app of an example has been spawned and joined, so + both the exit code and the banner are checked to confirm the showcase ran + end-to-end on the platform. + """ + selection = ",".join(names) + exit_code, out = target.execute(f"{_CLI} --examples='{selection}'") + output = out.decode(errors="replace") + logger.info(output) + assert exit_code == 0, f"Showcase CLI exited with {exit_code}:\n{output}" + for name in names: + assert f"Example '{name}' finished successfully" in output, ( + f"Showcase '{name}' did not finish successfully:\n{output}" + ) diff --git a/platform_integration_tests/test_async_runtime_showcase.py b/platform_integration_tests/test_async_runtime_showcase.py new file mode 100644 index 00000000000..4f604547246 --- /dev/null +++ b/platform_integration_tests/test_async_runtime_showcase.py @@ -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", + ) diff --git a/platform_integration_tests/test_communication_showcase.py b/platform_integration_tests/test_communication_showcase.py new file mode 100644 index 00000000000..0ccd0f6e3da --- /dev/null +++ b/platform_integration_tests/test_communication_showcase.py @@ -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") diff --git a/platform_integration_tests/test_lifecycle_showcase.py b/platform_integration_tests/test_lifecycle_showcase.py new file mode 100644 index 00000000000..e6afecb47ce --- /dev/null +++ b/platform_integration_tests/test_lifecycle_showcase.py @@ -0,0 +1,34 @@ +# ******************************************************************************* +# 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 lifecycle showcase. + +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__dependability__safety_features_1"], + test_type="interface-test", + derivation_technique="requirements-analysis", +) +def test_lifecycle_showcase(target): + """The lifecycle showcase launches two supervised applications and records + a malfunction, demonstrating the platform's health and lifecycle + management.""" + + run_showcases(target, "Simple Health and lifecycle management example") diff --git a/platform_integration_tests/test_logging_showcase.py b/platform_integration_tests/test_logging_showcase.py new file mode 100644 index 00000000000..cf599dd2ea3 --- /dev/null +++ b/platform_integration_tests/test_logging_showcase.py @@ -0,0 +1,34 @@ +# ******************************************************************************* +# 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 logging showcase. + +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__dev_experience__logging_support"], + test_type="interface-test", + derivation_technique="requirements-analysis", +) +def test_logging_showcase(target): + """The logging showcase runs an application logging via ``mw::log`` with + the console, remote (DLT) and file backends, demonstrating the platform's + logging support.""" + + run_showcases(target, "LoggingApp Demo") diff --git a/platform_integration_tests/test_showcases.py b/platform_integration_tests/test_showcases.py deleted file mode 100644 index 08b1da5824e..00000000000 --- a/platform_integration_tests/test_showcases.py +++ /dev/null @@ -1,123 +0,0 @@ -# ******************************************************************************* -# 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 tests. - -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. -""" - -import logging - -from attribute_plugin import add_test_properties - -logger = logging.getLogger(__name__) - -_CLI = "/showcases/bin/cli" - - -def _run_showcases(target, *names: str) -> None: - """Run the named showcases via the showcase entrypoint and assert success. - - ``run_score`` in the showcase CLI prints a per-example completion banner - and exits 0 once every app of an example has been spawned and joined, so - both the exit code and the banner are checked to confirm the showcase ran - end-to-end on the platform. - """ - selection = ",".join(names) - exit_code, out = target.execute(f"{_CLI} --examples='{selection}'") - output = out.decode(errors="replace") - logger.info(output) - assert exit_code == 0, f"Showcase CLI exited with {exit_code}:\n{output}" - for name in names: - assert f"Example '{name}' finished successfully" in output, ( - f"Showcase '{name}' did not finish successfully:\n{output}" - ) - - -@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") - - -@add_test_properties( - partially_verifies=["stkh_req__dev_experience__logging_support"], - test_type="interface-test", - derivation_technique="requirements-analysis", -) -def test_logging_showcase(target): - """The logging showcase runs an application logging via ``mw::log`` with - the console, remote (DLT) and file backends, demonstrating the platform's - logging support.""" - - _run_showcases(target, "LoggingApp Demo") - - -@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", - ) - - -@add_test_properties( - partially_verifies=["stkh_req__dependability__safety_features_1"], - test_type="interface-test", - derivation_technique="requirements-analysis", -) -def test_lifecycle_showcase(target): - """The lifecycle showcase launches two supervised applications and records - a malfunction, demonstrating the platform's health and lifecycle - management.""" - - _run_showcases(target, "Simple Health and lifecycle management example") - - -@add_test_properties( - partially_verifies=["stkh_req__time__vehicle_time_api"], - test_type="interface-test", - derivation_technique="requirements-analysis", -) -def test_vehicle_time_showcase(target): - """The vehicle time showcase obtains a combined snapshot of the - PTP-synchronized vehicle time and the local monotonic time, demonstrating - the platform's vehicle time base API.""" - - _run_showcases(target, "Vehicle Time Example") diff --git a/platform_integration_tests/test_vehicle_time_showcase.py b/platform_integration_tests/test_vehicle_time_showcase.py new file mode 100644 index 00000000000..06471d52f5c --- /dev/null +++ b/platform_integration_tests/test_vehicle_time_showcase.py @@ -0,0 +1,34 @@ +# ******************************************************************************* +# 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 vehicle time showcase. + +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__time__vehicle_time_api"], + test_type="interface-test", + derivation_technique="requirements-analysis", +) +def test_vehicle_time_showcase(target): + """The vehicle time showcase obtains a combined snapshot of the + PTP-synchronized vehicle time and the local monotonic time, demonstrating + the platform's vehicle time base API.""" + + run_showcases(target, "Vehicle Time Example") From 12d21791c5914fd07c6892e86bead11dcdd68bed Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Wed, 30 Sep 2026 11:15:15 +0000 Subject: [PATCH 4/5] chore(known_good): bump score_docs_as_code to the merged main commit --- bazel_common/score_modules_tooling.MODULE.bazel | 2 +- known_good.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel_common/score_modules_tooling.MODULE.bazel b/bazel_common/score_modules_tooling.MODULE.bazel index 60bc687d8c2..0a73b4bf1e4 100644 --- a/bazel_common/score_modules_tooling.MODULE.bazel +++ b/bazel_common/score_modules_tooling.MODULE.bazel @@ -67,7 +67,7 @@ git_override( bazel_dep(name = "score_docs_as_code") git_override( module_name = "score_docs_as_code", - commit = "a26274882b0ff41187e502c7bcdd26bbf5858232", + commit = "47f686dcc802cfb89e6472c5fa9f05bfae5d550b", remote = "https://github.com/eclipse-score/docs-as-code.git", ) diff --git a/known_good.json b/known_good.json index db29573c483..f10b87fd044 100644 --- a/known_good.json +++ b/known_good.json @@ -212,7 +212,7 @@ }, "score_docs_as_code": { "repo": "https://github.com/eclipse-score/docs-as-code.git", - "hash": "a26274882b0ff41187e502c7bcdd26bbf5858232" + "hash": "47f686dcc802cfb89e6472c5fa9f05bfae5d550b" }, "score_process_description": { "repo": "https://github.com/eclipse-score/process_description.git", From c3a6c7bccc8c2d0bdc11b08c8efc4471eda856db Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Wed, 30 Sep 2026 11:44:46 +0000 Subject: [PATCH 5/5] refactor(platform_integration_tests): split showcase tests into per-module packages - Move each showcase test into its own platform_integration_tests/ folder with a dedicated BUILD and py_itf_test target. - Turn platform_integration_tests:pit into a test_suite collecting the per-module targets; showcase_runner becomes a shared py_library. - Widen images/linux_x86_64:image_load visibility to __subpackages__. - Remove the duplicated test_run_all_showcases from feature_integration_tests/itf, now redundant with platform_integration_tests. --- .../itf/test_showcases.py | 6 -- images/linux_x86_64/BUILD | 2 +- platform_integration_tests/BUILD | 70 ++++++------------- .../communication/BUILD | 63 +++++++++++++++++ .../test_communication_showcase.py | 0 platform_integration_tests/kyron/BUILD | 63 +++++++++++++++++ .../test_async_runtime_showcase.py | 0 platform_integration_tests/lifecycle/BUILD | 63 +++++++++++++++++ .../test_lifecycle_showcase.py | 0 platform_integration_tests/logging/BUILD | 63 +++++++++++++++++ .../{ => logging}/test_logging_showcase.py | 0 platform_integration_tests/time/BUILD | 63 +++++++++++++++++ .../{ => time}/test_vehicle_time_showcase.py | 0 13 files changed, 337 insertions(+), 56 deletions(-) create mode 100644 platform_integration_tests/communication/BUILD rename platform_integration_tests/{ => communication}/test_communication_showcase.py (100%) create mode 100644 platform_integration_tests/kyron/BUILD rename platform_integration_tests/{ => kyron}/test_async_runtime_showcase.py (100%) create mode 100644 platform_integration_tests/lifecycle/BUILD rename platform_integration_tests/{ => lifecycle}/test_lifecycle_showcase.py (100%) create mode 100644 platform_integration_tests/logging/BUILD rename platform_integration_tests/{ => logging}/test_logging_showcase.py (100%) create mode 100644 platform_integration_tests/time/BUILD rename platform_integration_tests/{ => time}/test_vehicle_time_showcase.py (100%) diff --git a/feature_integration_tests/itf/test_showcases.py b/feature_integration_tests/itf/test_showcases.py index 830981489ee..45a011014fd 100644 --- a/feature_integration_tests/itf/test_showcases.py +++ b/feature_integration_tests/itf/test_showcases.py @@ -28,9 +28,3 @@ def test_com_api_example_app_is_running(target): ) logger.info(out) assert exit_code == 0 - - -def test_run_all_showcases(target): - exit_code, out = target.execute("/showcases/bin/cli --examples=all") - logger.info(out) - assert exit_code == 0 diff --git a/images/linux_x86_64/BUILD b/images/linux_x86_64/BUILD index 34f1a51defd..3aae5abbe77 100644 --- a/images/linux_x86_64/BUILD +++ b/images/linux_x86_64/BUILD @@ -63,6 +63,6 @@ oci_load( repo_tags = ["score_showcases:latest"], visibility = [ "//feature_integration_tests/itf:__pkg__", - "//platform_integration_tests:__pkg__", + "//platform_integration_tests:__subpackages__", ], ) diff --git a/platform_integration_tests/BUILD b/platform_integration_tests/BUILD index 041879c8255..a402feac68b 100644 --- a/platform_integration_tests/BUILD +++ b/platform_integration_tests/BUILD @@ -10,7 +10,9 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -load("@score_itf//:defs.bzl", "py_itf_test") +load("@rules_python//python:defs.bzl", "py_library") + +package(default_visibility = ["//platform_integration_tests:__subpackages__"]) config_setting( name = "config_linux_x86_64", @@ -30,56 +32,26 @@ config_setting( ], ) -py_itf_test( +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", - srcs = [ - "showcase_runner.py", - "test_async_runtime_showcase.py", - "test_communication_showcase.py", - "test_lifecycle_showcase.py", - "test_logging_showcase.py", - "test_vehicle_time_showcase.py", - ], - args = select( - { - ":config_linux_x86_64": [ - "--docker-image-bootstrap=$(location //images/linux_x86_64:image_load)", - "--docker-image=score_showcases:latest", - ], - ":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({ - ":config_linux_x86_64": [ - "//images/linux_x86_64:image_load", - ], - ":config_qnx_x86_64": [ - "//feature_integration_tests/configs:qemu_bridge_config.json", - "//images/qnx_x86_64:image", - ], - }), - plugins = select( - { - ":config_linux_x86_64": [ - "@score_itf//score/itf/plugins:docker_plugin", - ], - ":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", ], + tests = [ + "//platform_integration_tests/communication", + "//platform_integration_tests/kyron", + "//platform_integration_tests/lifecycle", + "//platform_integration_tests/logging", + "//platform_integration_tests/time", + ], ) diff --git a/platform_integration_tests/communication/BUILD b/platform_integration_tests/communication/BUILD new file mode 100644 index 00000000000..9e66577b34b --- /dev/null +++ b/platform_integration_tests/communication/BUILD @@ -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", + ], +) diff --git a/platform_integration_tests/test_communication_showcase.py b/platform_integration_tests/communication/test_communication_showcase.py similarity index 100% rename from platform_integration_tests/test_communication_showcase.py rename to platform_integration_tests/communication/test_communication_showcase.py diff --git a/platform_integration_tests/kyron/BUILD b/platform_integration_tests/kyron/BUILD new file mode 100644 index 00000000000..ee499ec18c3 --- /dev/null +++ b/platform_integration_tests/kyron/BUILD @@ -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", + ], +) diff --git a/platform_integration_tests/test_async_runtime_showcase.py b/platform_integration_tests/kyron/test_async_runtime_showcase.py similarity index 100% rename from platform_integration_tests/test_async_runtime_showcase.py rename to platform_integration_tests/kyron/test_async_runtime_showcase.py diff --git a/platform_integration_tests/lifecycle/BUILD b/platform_integration_tests/lifecycle/BUILD new file mode 100644 index 00000000000..3081d6cc4ec --- /dev/null +++ b/platform_integration_tests/lifecycle/BUILD @@ -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 = "lifecycle", + srcs = ["test_lifecycle_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", + ], +) diff --git a/platform_integration_tests/test_lifecycle_showcase.py b/platform_integration_tests/lifecycle/test_lifecycle_showcase.py similarity index 100% rename from platform_integration_tests/test_lifecycle_showcase.py rename to platform_integration_tests/lifecycle/test_lifecycle_showcase.py diff --git a/platform_integration_tests/logging/BUILD b/platform_integration_tests/logging/BUILD new file mode 100644 index 00000000000..fd24a192b90 --- /dev/null +++ b/platform_integration_tests/logging/BUILD @@ -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 = "logging", + srcs = ["test_logging_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", + ], +) diff --git a/platform_integration_tests/test_logging_showcase.py b/platform_integration_tests/logging/test_logging_showcase.py similarity index 100% rename from platform_integration_tests/test_logging_showcase.py rename to platform_integration_tests/logging/test_logging_showcase.py diff --git a/platform_integration_tests/time/BUILD b/platform_integration_tests/time/BUILD new file mode 100644 index 00000000000..e34def13680 --- /dev/null +++ b/platform_integration_tests/time/BUILD @@ -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 = "time", + srcs = ["test_vehicle_time_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", + ], +) diff --git a/platform_integration_tests/test_vehicle_time_showcase.py b/platform_integration_tests/time/test_vehicle_time_showcase.py similarity index 100% rename from platform_integration_tests/test_vehicle_time_showcase.py rename to platform_integration_tests/time/test_vehicle_time_showcase.py