From abbf856cce5470f419f028a231de3e196f5256ec Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Wed, 14 Oct 2026 07:07:54 +0000 Subject: [PATCH 1/4] Separate the deployed platform from the showcases that verify it Image content is now split into three layers: the image itself (//images/), the deployed S-CORE platform (//deploy) and the showcases that demonstrate and verify it (//showcases). Before this change the two upper layers were mixed in both directions: the lifecycle showcase shipped the launch_manager and the standalone showcase shipped the config_daemon, while the persistency test scenarios binary was packaged with the platform applications. A showcase that ships the component it exercises verifies the binary it brought along instead of the one the distribution deployed, so a distribution failing to deploy an S-CORE module would still pass. - Add //deploy with one package per module (lifecycle, logging, communication, config_management) and the aggregate :platform_bundle / :platform_tar that every image consumes. - Move launch_manager and config_daemon from the showcases into //deploy; the showcase manifests now drive the deployed binaries. - Move the persistency test scenarios binary from the platform packaging into //showcases. - Fold images/common/apps into //deploy and point all images at the single platform bundle. - Document the layering and the layer 2 / layer 3 contract in deploy/README.md and in the platform integration guide. --- deploy/BUILD | 43 ++++++++++++ deploy/README.md | 57 +++++++++++++++ deploy/communication/BUILD | 32 +++++++++ deploy/config_management/BUILD | 45 ++++++++++++ deploy/lifecycle/BUILD | 32 +++++++++ deploy/logging/BUILD | 39 +++++++++++ docs/integration_process/step_4_platforms.rst | 69 ++++++++++++------- images/common/apps/BUILD | 68 ------------------ images/linux_x86_64/BUILD | 12 +--- images/qnx_aarch64/build/BUILD | 12 ++-- images/qnx_x86_64/build/BUILD | 10 +-- showcases/BUILD | 2 + showcases/simple_lifecycle/BUILD | 4 +- .../simple_lifecycle.score.json | 2 +- showcases/standalone/BUILD | 22 ++++-- .../standalone/config_management.score.json | 6 +- 16 files changed, 326 insertions(+), 129 deletions(-) create mode 100644 deploy/BUILD create mode 100644 deploy/README.md create mode 100644 deploy/communication/BUILD create mode 100644 deploy/config_management/BUILD create mode 100644 deploy/lifecycle/BUILD create mode 100644 deploy/logging/BUILD delete mode 100644 images/common/apps/BUILD diff --git a/deploy/BUILD b/deploy/BUILD new file mode 100644 index 00000000000..0a02b93d4af --- /dev/null +++ b/deploy/BUILD @@ -0,0 +1,43 @@ +# ******************************************************************************* +# 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_pkg//pkg:mappings.bzl", "pkg_filegroup") +load("@rules_pkg//pkg:tar.bzl", "pkg_tar") + +exports_files(["README.md"]) + +# The S-CORE platform as deployed by this distribution: every binary and +# configuration file that an S-CORE module contributes to the shipped image. +# This is the system under test for the conformance showcases; it must stay +# free of anything that only exists to demonstrate or test the platform. +# +# Consumed by the QNX images via qnx_ifs srcs. +pkg_filegroup( + name = "platform_bundle", + srcs = [ + "//deploy/communication:etc_comm_configs", + "//deploy/config_management:config_daemon_bin", + "//deploy/config_management:config_daemon_configs", + "//deploy/lifecycle:launch_manager_bin", + "//deploy/logging:datarouter_bin", + "//deploy/logging:datarouter_configs", + ], + visibility = ["//visibility:public"], +) + +# Same content as :platform_bundle, as a tar for oci_image consumers. +pkg_tar( + name = "platform_tar", + srcs = [":platform_bundle"], + visibility = ["//visibility:public"], +) diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 00000000000..e7710771e1b --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,57 @@ +# Platform deployment (layer 2) + +The image content of this distribution is split into three layers: + +| Layer | Location | Content | +| --- | --- | --- | +| 1 — Image | `//images/` | Boot, kernel, drivers, root filesystem skeleton | +| 2 — Platform | `//deploy` | The S-CORE modules as deployed — the system under test | +| 3 — Showcases | `//showcases` | Applications that demonstrate and verify the platform | + +A production image ships layers 1 and 2. Layer 3 must be removable without +changing either of them. + +## Why layer 2 and layer 3 are separate + +The showcases are the probe, the platform is the probe's subject. If a +showcase shipped the component it exercises — as the lifecycle showcase did +with the launch manager before this split — then the check would be verifying +the binary it brought along rather than the one the distribution deployed. A +distribution that fails to deploy an S-CORE module would still pass. + +Keeping them apart gives the property that makes the checks meaningful: the +showcase applications run against whatever platform the image provides, and +fail when it is missing. + +That is also why a module's binaries can end up in different layers. The +lifecycle launch manager is deployed here; the applications it supervises, +and the launch manager configuration that declares them, live in +`//showcases/simple_lifecycle`. + +## Contract between layer 2 and layer 3 + +Layer 3 may rely on the following, and on nothing else: + +| Component | Deployed location | +| --- | --- | +| `launch_manager` | `/usr/bin/launch_manager` | +| `datarouter` | `/usr/bin/datarouter/datarouter`, config in `/usr/bin/datarouter/etc` | +| `config_daemon` | `/usr/bin/config_management/config_daemon`, config in `/usr/bin/config_management/etc` | +| mw::com system configuration | `/etc/mw_com_config.json` | + +Layer 2 never references anything under `/showcases`. The one place where +layer 2 reads layer 3 data is the launch manager, which is started by the +showcase with a working directory that holds the showcase's own +configuration — the configuration is passed in, not deployed alongside the +daemon. + +## Adding a module + +Add a `deploy//BUILD` that packages the module's binaries and +configuration with `pkg_files`, then list those targets in +`//deploy:platform_bundle`. Keep examples, demo applications and test +binaries out; those belong in `//showcases`. + +Long term each S-CORE module should export its own deployment package +upstream, so that "deployed correctly" becomes checkable rather than agreed. +Until then this directory is the distribution's local stand-in for it. diff --git a/deploy/communication/BUILD b/deploy/communication/BUILD new file mode 100644 index 00000000000..8d15117d677 --- /dev/null +++ b/deploy/communication/BUILD @@ -0,0 +1,32 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +# Deployment of the S-CORE communication module (layer 2, see //deploy:README.md). +# +# Communication ships as a library, so the only deployed artifacts are the +# system-wide configuration files every mw::com participant reads from /etc. + +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") + +package(default_visibility = ["//deploy:__pkg__"]) + +pkg_files( + name = "etc_comm_configs", + srcs = [ + "//feature_integration_tests/configs:etc/logging.json", + "//feature_integration_tests/configs:etc/mw_com_config.json", + ], + attributes = pkg_attributes(mode = "0777"), + prefix = "etc", + strip_prefix = strip_prefix.files_only(), +) diff --git a/deploy/config_management/BUILD b/deploy/config_management/BUILD new file mode 100644 index 00000000000..e3ad78712b1 --- /dev/null +++ b/deploy/config_management/BUILD @@ -0,0 +1,45 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +# Deployment of the S-CORE config management module (layer 2, see //deploy:README.md). + +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") + +package(default_visibility = ["//deploy:__pkg__"]) + +# Config daemon binary (0777), placed as /usr/bin/config_management/config_daemon. +pkg_files( + name = "config_daemon_bin", + srcs = ["@score_config_management//score/config_management/config_daemon/code:config_daemon"], + attributes = pkg_attributes(mode = "0777"), + prefix = "usr/bin/config_management", + strip_prefix = strip_prefix.files_only(), +) + +# Config daemon configuration (0644), placed under +# /usr/bin/config_management/etc. Both files are shipped by the upstream +# module, so they belong to the deployment and not to the showcase that +# drives the daemon. +pkg_files( + name = "config_daemon_configs", + srcs = [ + "@score_config_management//score/config_management/config_daemon/code/plugins/demo_json:demo_parameters", + "@score_config_management//score/config_management/config_daemon/code/services/details/mw_com:mw_com_config", + ], + attributes = pkg_attributes(mode = "0644"), + prefix = "usr/bin/config_management/etc", + renames = { + "@score_config_management//score/config_management/config_daemon/code/services/details/mw_com:mw_com_config": "mw_com_config.json", + "@score_config_management//score/config_management/config_daemon/code/plugins/demo_json:demo_parameters": "demo_parameters.json", + }, +) diff --git a/deploy/lifecycle/BUILD b/deploy/lifecycle/BUILD new file mode 100644 index 00000000000..0c1ea3239b7 --- /dev/null +++ b/deploy/lifecycle/BUILD @@ -0,0 +1,32 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +# Deployment of the S-CORE lifecycle module (layer 2, see //deploy:README.md). +# +# Only the launch manager daemon is deployed here. The applications it +# supervises, and the launch manager configuration that declares them, are +# payload of whoever uses the platform - for this repository that is the +# lifecycle showcase in //showcases/simple_lifecycle. + +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") + +package(default_visibility = ["//deploy:__pkg__"]) + +# Launch manager binary (0777), placed as /usr/bin/launch_manager. +pkg_files( + name = "launch_manager_bin", + srcs = ["@score_lifecycle//score/launch_manager"], + attributes = pkg_attributes(mode = "0777"), + prefix = "usr/bin", + strip_prefix = strip_prefix.files_only(), +) diff --git a/deploy/logging/BUILD b/deploy/logging/BUILD new file mode 100644 index 00000000000..24318d7427b --- /dev/null +++ b/deploy/logging/BUILD @@ -0,0 +1,39 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +# Deployment of the S-CORE logging module (layer 2, see //deploy:README.md). + +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") + +package(default_visibility = ["//deploy:__pkg__"]) + +# Datarouter binary (0777), placed under /usr/bin/datarouter. +pkg_files( + name = "datarouter_bin", + srcs = ["@score_logging//score/datarouter"], + attributes = pkg_attributes(mode = "0777"), + prefix = "usr/bin/datarouter", + strip_prefix = strip_prefix.files_only(), +) + +# Datarouter configuration files (0644), placed under /usr/bin/datarouter/etc. +pkg_files( + name = "datarouter_configs", + srcs = [ + "//feature_integration_tests/configs/datarouter:etc/log-channels.json", + "//feature_integration_tests/configs/datarouter:etc/logging.json", + ], + attributes = pkg_attributes(mode = "0644"), + prefix = "usr/bin/datarouter/etc", + strip_prefix = strip_prefix.files_only(), +) diff --git a/docs/integration_process/step_4_platforms.rst b/docs/integration_process/step_4_platforms.rst index 90445ac3cc5..dacdb495118 100644 --- a/docs/integration_process/step_4_platforms.rst +++ b/docs/integration_process/step_4_platforms.rst @@ -176,39 +176,64 @@ job** automatically. .. _add_directly: -Add a binary directly to an image ---------------------------------- - -If your component is not a CLI showcase — for example a background daemon that -must always be present — you wire it straight into each image's build -description instead. Unlike the showcase route, **this is per-image work: you -repeat it for every image you target** (Linux, QNX, AutoSD, EBcLfSA). - -The reference example is the ``datarouter``. Its destination path, permissions -and owner are declared once as a ``pkg_files`` target; because the binary is -resolved per platform (not per architecture) the definition is shared from -``images/common/apps`` and each image lists it in its ``srcs``. -``score_rules_imagefs`` then generates the matching ``mkifs`` directives, so -nothing has to be added to ``system.build``: +Deploy a component as part of the platform +------------------------------------------ + +If your component is not a showcase — for example a background daemon that must +always be present — it belongs to the *deployed platform* rather than to the +demonstration layer. The image content is split into three layers: + +* **Image** (``images/``) — boot, kernel, drivers, rootfs skeleton. +* **Platform** (``deploy/``) — the S-CORE modules as deployed. This is what a + conformance check treats as the system under test. +* **Showcases** (``showcases/``) — applications that demonstrate and verify the + platform, removable without touching the two layers below. + +Keep the two apart: a showcase must never ship the component it exercises, +otherwise it verifies the binary it brought along instead of the one the +distribution deployed. The lifecycle module is the illustrative case — the +``launch_manager`` daemon is deployed from ``deploy/lifecycle``, while the +applications it supervises stay in ``showcases/simple_lifecycle``. + +**1. Package the component.** Declare destination path and permissions as a +``pkg_files`` target in ``deploy//BUILD``. Because the binary is +resolved per platform (not per architecture), one definition serves every +image, and ``score_rules_imagefs`` generates the matching ``mkifs`` directives +so nothing has to be added to ``system.build``: .. code-block:: python - # images/common/apps/BUILD (defined once, shared by every image) + # deploy/logging/BUILD pkg_files( name = "datarouter_bin", srcs = ["@score_logging//score/datarouter"], attributes = pkg_attributes(mode = "0777"), prefix = "usr/bin/datarouter", strip_prefix = strip_prefix.files_only(), + ) + +**2. Register it in the platform bundle.** Unlike the showcase route this is +*not* per-image work: every image already consumes the aggregate, so adding +your target to it is enough. + +.. code-block:: python + + # deploy/BUILD + pkg_filegroup( + name = "platform_bundle", + srcs = [ + # ... + "//deploy/logging:datarouter_bin", + ], visibility = ["//visibility:public"], ) - # images/qnx_x86_64/build/BUILD (referenced per image) + # images/qnx_x86_64/build/BUILD (already present, shown for context) qnx_ifs( name = "init", srcs = [ # ... - "//images/common/apps:datarouter_bin", + "//deploy:platform_bundle", ], build_file = "init.build", extra_build_files = ["system.build"], @@ -218,12 +243,10 @@ Note that ``qnx_ifs`` rejects anything in ``srcs`` that does not provide a ``rules_pkg`` provider, so a plain ``filegroup`` or a bare label will not work - wrap it in ``pkg_files``. -See `images/common/apps/BUILD `_ -and `images/qnx_x86_64/build/BUILD `_ -for the full picture, and repeat the equivalent wiring in the other images you -need (`images/linux_x86_64 `_, -`images/autosd `_, -`images/ebclfsa_aarch64 `_). +See `deploy/README.md `_ +for the contract between the platform and the showcase layer, and +`images/qnx_x86_64/build/BUILD `_ +for how an image consumes it. If your module simply cannot run on a given platform, exclude its targets via ``metadata.exclude_test_targets`` / ``metadata.extra_test_config`` in diff --git a/images/common/apps/BUILD b/images/common/apps/BUILD deleted file mode 100644 index d5daaa5f623..00000000000 --- a/images/common/apps/BUILD +++ /dev/null @@ -1,68 +0,0 @@ -# ******************************************************************************* -# Copyright (c) 2025 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 -# ******************************************************************************* - -# Architecture-independent application packaging shared by the per-image targets. -# -# These pkg_files reference external module binaries/configs that Bazel resolves -# per platform (not per architecture), so a single definition works for every -# image. Consumers: -# - QNX images (qnx_x86_64, qnx_aarch64): reference these directly in qnx_ifs srcs. -# - Linux image (linux_x86_64): wraps them in a pkg_tar for oci_image. -# autosd/ebclfsa images do not ship these applications. - -load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "strip_prefix") - -# Datarouter binary (0777), placed under /usr/bin/datarouter. -pkg_files( - name = "datarouter_bin", - srcs = ["@score_logging//score/datarouter"], - attributes = pkg_attributes(mode = "0777"), - prefix = "usr/bin/datarouter", - strip_prefix = strip_prefix.files_only(), - visibility = ["//visibility:public"], -) - -# Datarouter configuration files (0644), placed under /usr/bin/datarouter/etc. -pkg_files( - name = "datarouter_configs", - srcs = [ - "//feature_integration_tests/configs/datarouter:etc/log-channels.json", - "//feature_integration_tests/configs/datarouter:etc/logging.json", - ], - attributes = pkg_attributes(mode = "0644"), - prefix = "usr/bin/datarouter/etc", - strip_prefix = strip_prefix.files_only(), - visibility = ["//visibility:public"], -) - -# Communication framework configuration in /etc (0777). -pkg_files( - name = "etc_comm_configs", - srcs = [ - "//feature_integration_tests/configs:etc/logging.json", - "//feature_integration_tests/configs:etc/mw_com_config.json", - ], - attributes = pkg_attributes(mode = "0777"), - prefix = "etc", - strip_prefix = strip_prefix.files_only(), - visibility = ["//visibility:public"], -) - -# Persistency C++ test scenarios binary, placed as /cpp_tests_persistency (0777). -pkg_files( - name = "cpp_tests_persistency_bin", - srcs = ["@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios"], - attributes = pkg_attributes(mode = "0777"), - renames = {"@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios": "cpp_tests_persistency"}, - visibility = ["//visibility:public"], -) diff --git a/images/linux_x86_64/BUILD b/images/linux_x86_64/BUILD index 034a9e7683d..6e644736013 100644 --- a/images/linux_x86_64/BUILD +++ b/images/linux_x86_64/BUILD @@ -11,7 +11,6 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* load("@rules_oci//oci:defs.bzl", "oci_image", "oci_load") -load("@rules_pkg//pkg:tar.bzl", "pkg_tar") load("@rules_shell//shell:sh_binary.bzl", "sh_binary") sh_binary( @@ -30,21 +29,12 @@ sh_binary( }, ) -# Datarouter binary and configs, shared via //images/common/apps. -pkg_tar( - name = "datarouter_tar", - srcs = [ - "//images/common/apps:datarouter_bin", - "//images/common/apps:datarouter_configs", - ], -) - oci_image( name = "image", base = "@ubuntu_22_04_linux_amd64", tars = [ + "//deploy:platform_tar", "//showcases:showcases_pkg_tar", - ":datarouter_tar", ], ) diff --git a/images/qnx_aarch64/build/BUILD b/images/qnx_aarch64/build/BUILD index a219df4f872..1ba13c80c90 100644 --- a/images/qnx_aarch64/build/BUILD +++ b/images/qnx_aarch64/build/BUILD @@ -14,18 +14,14 @@ load("@score_rules_imagefs//rules/qnx:ifs.bzl", "qnx_ifs") # The architecture-independent configuration files are shared via -# //images/qnx_common/configs; the application packaging (datarouter -# binary/configs, communication configs, persistency test binary) via -# //images/common/apps. The aarch64 QEMU virt image has no arch-specific -# configuration files of its own. +# //images/qnx_common/configs; the deployed S-CORE platform comes from +# //deploy and the applications demonstrating it from //showcases. The +# aarch64 QEMU virt image has no arch-specific configuration files of its own. qnx_ifs( name = "init", srcs = [ - "//images/common/apps:cpp_tests_persistency_bin", - "//images/common/apps:datarouter_bin", - "//images/common/apps:datarouter_configs", - "//images/common/apps:etc_comm_configs", + "//deploy:platform_bundle", "//images/qnx_common/configs:etc_configs", "//images/qnx_common/configs:etc_network_capture", "//images/qnx_common/configs:etc_scripts", diff --git a/images/qnx_x86_64/build/BUILD b/images/qnx_x86_64/build/BUILD index 1306c8ffa0b..624b8b10638 100644 --- a/images/qnx_x86_64/build/BUILD +++ b/images/qnx_x86_64/build/BUILD @@ -43,19 +43,15 @@ pkg_files( ) # The architecture-independent configuration files are shared via -# //images/qnx_common/configs; the application packaging (datarouter -# binary/configs, communication configs, persistency test binary) via -# //images/common/apps. +# //images/qnx_common/configs; the deployed S-CORE platform comes from +# //deploy and the applications demonstrating it from //showcases. qnx_ifs( name = "init", srcs = [ ":etc_startup_hw", ":pci_configs", - "//images/common/apps:cpp_tests_persistency_bin", - "//images/common/apps:datarouter_bin", - "//images/common/apps:datarouter_configs", - "//images/common/apps:etc_comm_configs", + "//deploy:platform_bundle", "//images/qnx_common/configs:etc_configs", "//images/qnx_common/configs:etc_network_capture", "//images/qnx_common/configs:etc_scripts", diff --git a/showcases/BUILD b/showcases/BUILD index 7f5f081dedd..2d9554a0950 100644 --- a/showcases/BUILD +++ b/showcases/BUILD @@ -22,6 +22,7 @@ score_pkg_bundle( "//showcases/standalone:time_pkg_files", "//showcases/standalone:logging_pkg_files", "//showcases/standalone:config_management_pkg_files", + "//showcases/standalone:persistency_pkg_files", "//showcases/simple_lifecycle:simple_lifecycle_pkg_files", ], package_dir = "showcases", @@ -40,6 +41,7 @@ pkg_filegroup( "//showcases/standalone:config_management_pkg_files", "//showcases/standalone:kyron_pkg_files", "//showcases/standalone:logging_pkg_files", + "//showcases/standalone:persistency_pkg_files", "//showcases/standalone:time_pkg_files", ], prefix = "showcases", diff --git a/showcases/simple_lifecycle/BUILD b/showcases/simple_lifecycle/BUILD index 37afd26f68f..ba609151fe1 100644 --- a/showcases/simple_lifecycle/BUILD +++ b/showcases/simple_lifecycle/BUILD @@ -20,10 +20,12 @@ launch_manager_config( flatbuffer_out_dir = "etc", ) +# The launch manager itself is part of the deployed platform +# (//deploy/lifecycle), not of this showcase. What ships here are the +# applications it supervises and the configuration that declares them. score_pkg_bundle( name = "simple_lifecycle", bins = [ - "@score_lifecycle//score/launch_manager:launch_manager", "@score_lifecycle//examples/cpp_supervised_app", "@score_lifecycle//examples/rust_supervised_app", "@score_lifecycle//examples/control_application:control_daemon", diff --git a/showcases/simple_lifecycle/simple_lifecycle.score.json b/showcases/simple_lifecycle/simple_lifecycle.score.json index 5b05a6b83bf..39ef65d4871 100644 --- a/showcases/simple_lifecycle/simple_lifecycle.score.json +++ b/showcases/simple_lifecycle/simple_lifecycle.score.json @@ -3,7 +3,7 @@ "description": "Example runs two applications and monitors if they are healthy. When some application is malfunctioning, this will be recorded. Examples takes ~15s", "apps": [ { - "path": "/showcases/bin/launch_manager", + "path": "/usr/bin/launch_manager", "dir": "/showcases/data/simple_lifecycle", "args": [], "env": {} diff --git a/showcases/standalone/BUILD b/showcases/standalone/BUILD index 0bb5b946e8d..3b4b8c1f391 100644 --- a/showcases/standalone/BUILD +++ b/showcases/standalone/BUILD @@ -10,6 +10,7 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") load("//bazel_common:bundlers.bzl", "score_pkg_bundle") score_pkg_bundle( @@ -67,17 +68,24 @@ score_pkg_bundle( package_dir = "standalone", ) +# The config daemon and its configuration are part of the deployed platform +# (//deploy/config_management). This showcase only contributes the manifest +# that drives the deployed daemon. score_pkg_bundle( name = "config_management", - bins = [ - "@score_config_management//score/config_management/config_daemon/code:config_daemon", - ], + bins = [], config_data = [ "//showcases/standalone:config_management.score.json", ], - custom_layout = { - "@score_config_management//score/config_management/config_daemon/code/services/details/mw_com:mw_com_config": "etc/mw_com_config.json", - "@score_config_management//score/config_management/config_daemon/code/plugins/demo_json:demo_parameters": "etc/demo_parameters.json", - }, package_dir = "standalone", ) + +# Persistency has no runnable showcase yet; the upstream test scenarios binary +# is shipped so that one can be added without changing the image layout. +pkg_files( + name = "persistency_pkg_files", + srcs = ["@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios"], + attributes = pkg_attributes(mode = "0755"), + renames = {"@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios": "bin/cpp_tests_persistency"}, + visibility = ["//visibility:public"], +) diff --git a/showcases/standalone/config_management.score.json b/showcases/standalone/config_management.score.json index bebc27d87be..a82d582f41f 100644 --- a/showcases/standalone/config_management.score.json +++ b/showcases/standalone/config_management.score.json @@ -3,12 +3,12 @@ "description": "Example for running the config management daemon with demo parameters (non functional yet)", "apps": [ { - "path": "/showcases/bin/config_daemon", + "path": "/usr/bin/config_management/config_daemon", "args": [ - "-s", "/showcases/data/config_management/etc/mw_com_config.json" + "-s", "/usr/bin/config_management/etc/mw_com_config.json" ], "env": {}, - "dir": "/showcases/data/config_management" + "dir": "/usr/bin/config_management" } ] } From d1693343b748ba33de66ecec8b1b22dc135f31a2 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Wed, 14 Oct 2026 13:26:05 +0000 Subject: [PATCH 2/4] Move deployed configuration out of the test directory The datarouter and mw::com configuration files lived under feature_integration_tests/configs/ but were never read by the feature integration tests. Their only consumers are the deployment packages and the ebclfsa image, so they belong next to the module they configure. Files move unchanged; the packaged paths stay /usr/bin/datarouter/etc/* and /etc/*. What remains in feature_integration_tests/configs is the test harness configuration (dlt_config_*, qemu_bridge_config). --- deploy/README.md | 5 ++-- deploy/communication/BUILD | 15 +++++++++-- .../communication}/etc/logging.json | 0 .../communication}/etc/mw_com_config.json | 0 deploy/logging/BUILD | 4 +-- .../logging}/etc/log-channels.json | 0 .../logging}/etc/logging.json | 0 feature_integration_tests/configs/BUILD | 16 ++---------- .../configs/datarouter/BUILD | 26 ------------------- images/ebclfsa_aarch64/build/BUILD | 2 +- 10 files changed, 21 insertions(+), 47 deletions(-) rename {feature_integration_tests/configs => deploy/communication}/etc/logging.json (100%) rename {feature_integration_tests/configs => deploy/communication}/etc/mw_com_config.json (100%) rename {feature_integration_tests/configs/datarouter => deploy/logging}/etc/log-channels.json (100%) rename {feature_integration_tests/configs/datarouter => deploy/logging}/etc/logging.json (100%) delete mode 100644 feature_integration_tests/configs/datarouter/BUILD diff --git a/deploy/README.md b/deploy/README.md index e7710771e1b..64c0d0e9bc2 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -49,8 +49,9 @@ daemon. Add a `deploy//BUILD` that packages the module's binaries and configuration with `pkg_files`, then list those targets in -`//deploy:platform_bundle`. Keep examples, demo applications and test -binaries out; those belong in `//showcases`. +`//deploy:platform_bundle`. Configuration that is deployed onto the target +is kept in `deploy//etc/`, not in a test directory. Keep examples, +demo applications and test binaries out; those belong in `//showcases`. Long term each S-CORE module should export its own deployment package upstream, so that "deployed correctly" becomes checkable rather than agreed. diff --git a/deploy/communication/BUILD b/deploy/communication/BUILD index 8d15117d677..f6838244913 100644 --- a/deploy/communication/BUILD +++ b/deploy/communication/BUILD @@ -23,10 +23,21 @@ package(default_visibility = ["//deploy:__pkg__"]) pkg_files( name = "etc_comm_configs", srcs = [ - "//feature_integration_tests/configs:etc/logging.json", - "//feature_integration_tests/configs:etc/mw_com_config.json", + "etc/logging.json", + "etc/mw_com_config.json", ], attributes = pkg_attributes(mode = "0777"), prefix = "etc", strip_prefix = strip_prefix.files_only(), ) + +# Same files as a plain filegroup, for images that assemble /etc themselves +# instead of consuming rules_pkg providers. +filegroup( + name = "etc_configs", + srcs = [ + "etc/logging.json", + "etc/mw_com_config.json", + ], + visibility = ["//visibility:public"], +) diff --git a/feature_integration_tests/configs/etc/logging.json b/deploy/communication/etc/logging.json similarity index 100% rename from feature_integration_tests/configs/etc/logging.json rename to deploy/communication/etc/logging.json diff --git a/feature_integration_tests/configs/etc/mw_com_config.json b/deploy/communication/etc/mw_com_config.json similarity index 100% rename from feature_integration_tests/configs/etc/mw_com_config.json rename to deploy/communication/etc/mw_com_config.json diff --git a/deploy/logging/BUILD b/deploy/logging/BUILD index 24318d7427b..6c6930cb356 100644 --- a/deploy/logging/BUILD +++ b/deploy/logging/BUILD @@ -30,8 +30,8 @@ pkg_files( pkg_files( name = "datarouter_configs", srcs = [ - "//feature_integration_tests/configs/datarouter:etc/log-channels.json", - "//feature_integration_tests/configs/datarouter:etc/logging.json", + "etc/log-channels.json", + "etc/logging.json", ], attributes = pkg_attributes(mode = "0644"), prefix = "usr/bin/datarouter/etc", diff --git a/feature_integration_tests/configs/datarouter/etc/log-channels.json b/deploy/logging/etc/log-channels.json similarity index 100% rename from feature_integration_tests/configs/datarouter/etc/log-channels.json rename to deploy/logging/etc/log-channels.json diff --git a/feature_integration_tests/configs/datarouter/etc/logging.json b/deploy/logging/etc/logging.json similarity index 100% rename from feature_integration_tests/configs/datarouter/etc/logging.json rename to deploy/logging/etc/logging.json diff --git a/feature_integration_tests/configs/BUILD b/feature_integration_tests/configs/BUILD index dce9a78284e..1b1e01d73b2 100644 --- a/feature_integration_tests/configs/BUILD +++ b/feature_integration_tests/configs/BUILD @@ -10,6 +10,8 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* +# Test harness configuration. Configuration that is deployed onto the target +# belongs to //deploy, not here. exports_files( [ "dlt_config_qnx_x86_64.json", @@ -17,17 +19,3 @@ exports_files( "qemu_bridge_config.json", ], ) - -exports_files([ - "etc/logging.json", - "etc/mw_com_config.json", -]) - -filegroup( - name = "etc_configs", - srcs = [ - "etc/logging.json", - "etc/mw_com_config.json", - ], - visibility = ["//visibility:public"], -) diff --git a/feature_integration_tests/configs/datarouter/BUILD b/feature_integration_tests/configs/datarouter/BUILD deleted file mode 100644 index ab722788def..00000000000 --- a/feature_integration_tests/configs/datarouter/BUILD +++ /dev/null @@ -1,26 +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 -# ******************************************************************************* - -exports_files([ - "etc/logging.json", - "etc/log-channels.json", -]) - -filegroup( - name = "etc_configs", - srcs = [ - "etc/log-channels.json", - "etc/logging.json", - ], - visibility = ["//visibility:public"], -) diff --git a/images/ebclfsa_aarch64/build/BUILD b/images/ebclfsa_aarch64/build/BUILD index b5d66fbafe6..3dc353498c7 100644 --- a/images/ebclfsa_aarch64/build/BUILD +++ b/images/ebclfsa_aarch64/build/BUILD @@ -47,7 +47,7 @@ genrule( name = "fastdev-image", srcs = [ "//showcases:showcases_pkg_tar", - "//feature_integration_tests/configs:etc_configs", + "//deploy/communication:etc_configs", ":extract-fastdev-image", ":crinit_config_tar", ":scripts_tar", From 58d8efc505486b805d5837cab7c690f51d2b1204 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Thu, 15 Oct 2026 09:34:57 +0000 Subject: [PATCH 3/4] Bundle the persistency showcase like the other standalone showcases Use score_pkg_bundle instead of a hand-written pkg_files. An alias keeps the installed binary name bin/cpp_tests_persistency, since score_pkg_bundle names binaries after their label. --- showcases/standalone/BUILD | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/showcases/standalone/BUILD b/showcases/standalone/BUILD index 3b4b8c1f391..445c11f25ee 100644 --- a/showcases/standalone/BUILD +++ b/showcases/standalone/BUILD @@ -10,7 +10,6 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") load("//bazel_common:bundlers.bzl", "score_pkg_bundle") score_pkg_bundle( @@ -82,10 +81,14 @@ score_pkg_bundle( # Persistency has no runnable showcase yet; the upstream test scenarios binary # is shipped so that one can be added without changing the image layout. -pkg_files( - name = "persistency_pkg_files", - srcs = ["@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios"], - attributes = pkg_attributes(mode = "0755"), - renames = {"@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios": "bin/cpp_tests_persistency"}, - visibility = ["//visibility:public"], +# score_pkg_bundle names binaries after their label, hence the alias. +alias( + name = "cpp_tests_persistency", + actual = "@score_persistency//score/kvs/tests/test_scenarios/cpp:test_scenarios", +) + +score_pkg_bundle( + name = "persistency", + bins = ["//showcases/standalone:cpp_tests_persistency"], + package_dir = "standalone", ) From 6c7ff63f8b11c5c615db7e209d1f4cbcb39d6f91 Mon Sep 17 00:00:00 2001 From: Anton Krivoborodov Date: Thu, 15 Oct 2026 12:53:28 +0000 Subject: [PATCH 4/4] ci: run platform integration tests on QNX x86_64 The showcases are shipped in the QNX image, but only the ITF suite ran there, so none of them was ever executed on QNX. Run //platform_integration_tests:pit against the same QEMU image. --- .github/workflows/build_and_test_qnx.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_and_test_qnx.yml b/.github/workflows/build_and_test_qnx.yml index 54e8dbd5039..dd5cf9aadef 100644 --- a/.github/workflows/build_and_test_qnx.yml +++ b/.github/workflows/build_and_test_qnx.yml @@ -76,6 +76,9 @@ jobs: - name: Run integration tests run: | bazel test --lockfile_mode=error --config=itf-qnx-x86_64 //feature_integration_tests/itf + - name: Run platform integration tests + run: | + bazel test --lockfile_mode=error --config=itf-qnx-x86_64 //platform_integration_tests:pit - name: Cleanup QNX license if: always() run: sudo rm -rf /opt/score_qnx