Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/test_and_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions bazel_common/score_modules_tooling.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "47f686dcc802cfb89e6472c5fa9f05bfae5d550b",
remote = "https://github.com/eclipse-score/docs-as-code.git",
)

bazel_dep(name = "score_process_description")
Expand Down
6 changes: 0 additions & 6 deletions feature_integration_tests/itf/test_showcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions images/linux_x86_64/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@ oci_load(
repo_tags = ["score_showcases:latest"],
visibility = [
"//feature_integration_tests/itf:__pkg__",
"//platform_integration_tests:__subpackages__",
],
)
2 changes: 1 addition & 1 deletion known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
},
"score_docs_as_code": {
"repo": "https://github.com/eclipse-score/docs-as-code.git",
"version": "8.3.0"
"hash": "47f686dcc802cfb89e6472c5fa9f05bfae5d550b"
},
"score_process_description": {
"repo": "https://github.com/eclipse-score/process_description.git",
Expand Down
Empty file.
57 changes: 57 additions & 0 deletions platform_integration_tests/BUILD
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",
],
)

Copy link
Copy Markdown
Contributor

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

63 changes: 63 additions & 0 deletions platform_integration_tests/communication/BUILD
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",
],
)
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")
63 changes: 63 additions & 0 deletions platform_integration_tests/kyron/BUILD
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 platform_integration_tests/kyron/test_async_runtime_showcase.py
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",
)
Loading
Loading