From 07e7512566e2445cbe8451bd83df52992fba11ec Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Thu, 12 Feb 2026 16:02:36 +0100 Subject: [PATCH 01/10] Extend structure --- scripts/known_good/models/module.py | 30 ++++++++++++------- .../update_module_from_known_good.py | 6 ++-- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/scripts/known_good/models/module.py b/scripts/known_good/models/module.py index 259f4f2861..229a02bfe2 100644 --- a/scripts/known_good/models/module.py +++ b/scripts/known_good/models/module.py @@ -14,22 +14,25 @@ class Module: hash: str repo: str version: str | None = None - patches: list[str] | None = None + bazel_patches: list[str] | None = None + impl_path: Dict[str, Dict[str, Any]] | None = None branch: str = "main" @classmethod def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: """Create a Module instance from a dictionary representation. - + Args: name: The module name module_data: Dictionary containing module configuration with keys: - repo (str): Repository URL - hash or commit (str): Commit hash - - version (str, optional): Module version - - patches (list[str], optional): List of patch files + - version (str, optional): Module version (when present, hash is ignored) + - bazel_patches (list[str], optional): List of patch files for Bazel + - impl_path (dict, optional): Language-specific implementation paths + Example: {"rust": {"code_root_path": "src", "exclude_test_targets": [""]}} - branch (str, optional): Git branch name (default: main) - + Returns: Module instance """ @@ -37,15 +40,18 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: # Support both 'hash' and 'commit' keys commit_hash = module_data.get("hash") or module_data.get("commit", "") version = module_data.get("version") - patches = module_data.get("patches", []) + # Support both 'bazel_patches' and legacy 'patches' keys + bazel_patches = module_data.get("bazel_patches") or module_data.get("patches", []) + impl_path = module_data.get("impl_path") branch = module_data.get("branch", "main") - + return cls( name=name, hash=commit_hash, repo=repo, version=version, - patches=patches if patches else None, + bazel_patches=bazel_patches if bazel_patches else None, + impl_path=impl_path, branch=branch ) @@ -93,7 +99,7 @@ def owner_repo(self) -> str: def to_dict(self) -> Dict[str, Any]: """Convert Module instance to dictionary representation for JSON output. - + Returns: Dictionary with module configuration """ @@ -103,8 +109,10 @@ def to_dict(self) -> Dict[str, Any]: } if self.version: result["version"] = self.version - if self.patches: - result["patches"] = self.patches + if self.impl_path: + result["impl_path"] = self.impl_path + if self.bazel_patches: + result["bazel_patches"] = self.bazel_patches if self.branch and self.branch != "main": result["branch"] = self.branch return result diff --git a/scripts/known_good/update_module_from_known_good.py b/scripts/known_good/update_module_from_known_good.py index 17cd796e01..1de8155ade 100755 --- a/scripts/known_good/update_module_from_known_good.py +++ b/scripts/known_good/update_module_from_known_good.py @@ -38,11 +38,11 @@ def generate_git_override_blocks(modules: List[Module], repo_commit_dict: Dict[s if module.repo in repo_commit_dict: commit = repo_commit_dict[module.repo] - # Generate patches lines if patches exist + # Generate patches lines if bazel_patches exist patches_lines = "" - if module.patches: + if module.bazel_patches: patches_lines = " patches = [\n" - for patch in module.patches: + for patch in module.bazel_patches: patches_lines += f' "{patch}",\n' patches_lines += " ],\n patch_strip = 1,\n" From 5aeeea43562edbf320b9872f16a8844050c87e99 Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Thu, 12 Feb 2026 16:17:29 +0100 Subject: [PATCH 02/10] Adapt structure --- known_good.json | 124 +++++++++--------- scripts/known_good/models/known_good.py | 72 ++++++++-- .../update_module_from_known_good.py | 100 +++++++++----- 3 files changed, 193 insertions(+), 103 deletions(-) diff --git a/known_good.json b/known_good.json index 8aefbcce54..c25ff0c5f3 100644 --- a/known_good.json +++ b/known_good.json @@ -1,66 +1,72 @@ { "modules": { - "score_baselibs": { - "repo": "https://github.com/eclipse-score/baselibs.git", - "hash": "ffd1c812213c66a436ed982632f6942528b58be8" + "target_sw": { + "score_baselibs": { + "repo": "https://github.com/eclipse-score/baselibs.git", + "hash": "ffd1c812213c66a436ed982632f6942528b58be8" + }, + "score_baselibs_rust": { + "repo": "https://github.com/eclipse-score/baselibs_rust.git", + "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c" + }, + "score_communication": { + "repo": "https://github.com/eclipse-score/communication.git", + "hash": "0c0ea032995eaa766f5bdcec031bc02ee10d4587" + }, + "score_logging": { + "repo": "https://github.com/eclipse-score/logging.git", + "hash": "2b3e56cf12cf582d0c0a235cad3d1d9b9fc1e494" + }, + "score_persistency": { + "repo": "https://github.com/eclipse-score/persistency.git", + "hash": "9c1f0c1b1cd9b49621ecf4f9d541ded100fe2c08" + }, + "score_orchestrator": { + "repo": "https://github.com/eclipse-score/orchestrator.git", + "hash": "fd6e21820a361b0c5ab69553f01bd68174d89ffd" + }, + "score_kyron": { + "repo": "https://github.com/eclipse-score/kyron.git", + "hash": "d146401db4557d840850a7b5fc21b0f4fc8aac20" + }, + "score_feo": { + "repo": "https://github.com/eclipse-score/feo.git", + "hash": "4841281ab81aad114cfc86a19a69c029a274f28d", + "branch": "candidate_v0.5" + }, + "score_lifecycle_health": { + "repo": "https://github.com/eclipse-score/lifecycle.git", + "hash": "297808cf7c0013e08a0982133a0add1d9b1a9d9e" + } }, - "score_baselibs_rust": { - "repo": "https://github.com/eclipse-score/baselibs_rust.git", - "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c" - }, - "score_communication": { - "repo": "https://github.com/eclipse-score/communication.git", - "hash": "0c0ea032995eaa766f5bdcec031bc02ee10d4587" - }, - "score_logging": { - "repo": "https://github.com/eclipse-score/logging.git", - "hash": "2b3e56cf12cf582d0c0a235cad3d1d9b9fc1e494" - }, - "score_persistency": { - "repo": "https://github.com/eclipse-score/persistency.git", - "hash": "9c1f0c1b1cd9b49621ecf4f9d541ded100fe2c08" - }, - "score_orchestrator": { - "repo": "https://github.com/eclipse-score/orchestrator.git", - "hash": "fd6e21820a361b0c5ab69553f01bd68174d89ffd" - }, - "score_kyron": { - "repo": "https://github.com/eclipse-score/kyron.git", - "hash": "d146401db4557d840850a7b5fc21b0f4fc8aac20" - }, - "score_feo": { - "repo": "https://github.com/eclipse-score/feo.git", - "hash": "4841281ab81aad114cfc86a19a69c029a274f28d", - "branch": "candidate_v0.5" - }, - "score_tooling": { - "repo": "https://github.com/eclipse-score/tooling.git", - "hash": "17671026150db4b4cc1b35e48af81b97e13685e5" - }, - "score_platform": { - "repo": "https://github.com/eclipse-score/score.git", - "hash": "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e" - }, - "score_bazel_platforms": { - "repo": "https://github.com/eclipse-score/bazel_platforms.git", - "hash": "3ac1b805ba42b58a13f8960f947b7866c8bcf26c" - }, - "score_test_scenarios": { - "repo": "https://github.com/eclipse-score/testing_tools.git", - "hash": "6b5e85863e8fb5687251c19f5bb81e0a3afdf581" - }, - "score_docs_as_code": { - "repo": "https://github.com/eclipse-score/docs-as-code.git", - "hash": "ba006429268e6bd9b856088f7a4217742ed09025" - }, - "score_process": { - "repo": "https://github.com/eclipse-score/process_description.git", - "hash": "6c772cf05a493218a5ac6071361bf0b66c5427b2" - }, - "score_lifecycle_health": { - "repo": "https://github.com/eclipse-score/lifecycle.git", - "hash": "297808cf7c0013e08a0982133a0add1d9b1a9d9e" + "tooling": { + "score_tooling": { + "repo": "https://github.com/eclipse-score/tooling.git", + "hash": "17671026150db4b4cc1b35e48af81b97e13685e5" + }, + "score_platform": { + "repo": "https://github.com/eclipse-score/score.git", + "hash": "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e" + }, + "score_bazel_platforms": { + "repo": "https://github.com/eclipse-score/bazel_platforms.git", + "hash": "3ac1b805ba42b58a13f8960f947b7866c8bcf26c" + }, + "score_test_scenarios": { + "repo": "https://github.com/eclipse-score/testing_tools.git", + "hash": "6b5e85863e8fb5687251c19f5bb81e0a3afdf581" + }, + "score_docs_as_code": { + "repo": "https://github.com/eclipse-score/docs-as-code.git", + "hash": "ba006429268e6bd9b856088f7a4217742ed09025" + }, + "score_process": { + "repo": "https://github.com/eclipse-score/process_description.git", + "hash": "6c772cf05a493218a5ac6071361bf0b66c5427b2" + } } + + }, "timestamp": "2026-02-10T21:12:42+00:00Z" } diff --git a/scripts/known_good/models/known_good.py b/scripts/known_good/models/known_good.py index 64cb50bb4d..c9e9ced139 100644 --- a/scripts/known_good/models/known_good.py +++ b/scripts/known_good/models/known_good.py @@ -13,35 +13,83 @@ @dataclass class KnownGood: - """Known good configuration with modules and metadata.""" - modules: Dict[str, Module] + """Known good configuration with modules and metadata. + + Supports both flat and grouped module structures: + - Flat: modules = {"default": {"module1": Module, "module2": Module}} + - Grouped: modules = {"group1": {"module1": Module}, "group2": {"module2": Module}} + """ + modules: Dict[str, Dict[str, Module]] timestamp: str - + is_grouped: bool = False + @classmethod def from_dict(cls, data: Dict[str, Any]) -> KnownGood: """Create a KnownGood instance from a dictionary. - + + Automatically detects flat vs grouped structure: + - Flat: {"modules": {"score_baselibs": {...}, "score_logging": {...}}} + - Grouped: {"modules": {"code": {"score_baselibs": {...}}, "abc": {"score_logging": {...}}}} + Args: data: Dictionary containing known_good.json data - + Returns: KnownGood instance """ modules_dict = data.get('modules', {}) - modules_list = Module.parse_modules(modules_dict) - modules = {m.name: m for m in modules_list} timestamp = data.get('timestamp', '') - - return cls(modules=modules, timestamp=timestamp) - + + # Detect if structure is grouped or flat + # Grouped structure: values are dicts containing module configs + # Flat structure: values are module configs directly (have 'repo' or 'version' keys) + is_grouped = False + parsed_modules: Dict[str, Dict[str, Module]] = {} + + if modules_dict: + # Check first entry to determine structure + first_key = next(iter(modules_dict)) + first_value = modules_dict[first_key] + + # If first value is a dict without 'repo' or 'version', it's likely a group + if isinstance(first_value, dict) and not ('repo' in first_value or 'version' in first_value): + # Grouped structure + is_grouped = True + for group_name, group_modules in modules_dict.items(): + if isinstance(group_modules, dict): + modules_list = Module.parse_modules(group_modules) + parsed_modules[group_name] = {m.name: m for m in modules_list} + else: + # Flat structure - use "default" as group name + is_grouped = False + modules_list = Module.parse_modules(modules_dict) + parsed_modules["default"] = {m.name: m for m in modules_list} + + return cls(modules=parsed_modules, timestamp=timestamp, is_grouped=is_grouped) + def to_dict(self) -> Dict[str, Any]: """Convert KnownGood instance to dictionary for JSON output. - + + Preserves the original structure (flat vs grouped). + Returns: Dictionary with known_good configuration """ + if self.is_grouped: + # Grouped structure + modules_output = { + group_name: {name: module.to_dict() for name, module in group_modules.items()} + for group_name, group_modules in self.modules.items() + } + else: + # Flat structure - extract from "default" group + modules_output = { + name: module.to_dict() + for name, module in self.modules.get("default", {}).items() + } + return { - "modules": {name: module.to_dict() for name, module in self.modules.items()}, + "modules": modules_output, "timestamp": self.timestamp } diff --git a/scripts/known_good/update_module_from_known_good.py b/scripts/known_good/update_module_from_known_good.py index 1de8155ade..0b19dc4b64 100755 --- a/scripts/known_good/update_module_from_known_good.py +++ b/scripts/known_good/update_module_from_known_good.py @@ -143,22 +143,28 @@ def generate_file_content(args: argparse.Namespace, modules: List[Module], repo_ def main() -> None: parser = argparse.ArgumentParser( - description="Generate score_modules.MODULE.bazel from known_good.json", + description="Generate score_modules.MODULE.bazel file(s) from known_good.json", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: # Generate MODULE.bazel from known_good.json python3 scripts/known_good/update_module_from_known_good.py - # Use a custom input and output file + # Use a custom input file (generates score_modules_{group}.MODULE.bazel for each group) python3 scripts/known_good/update_module_from_known_good.py \\ - --known custom_known_good.json \\ - --output custom_modules.MODULE.bazel + --known custom_known_good.json + + # Specify output directory for grouped modules + python3 scripts/known_good/update_module_from_known_good.py \\ + --output-dir ./bazel_modules # Preview without writing python3 scripts/known_good/update_module_from_known_good.py --dry-run -Note: To override repository commits, use scripts/known_good/override_known_good_repo.py first. +Note: + - For grouped structure, generates score_modules_{group}.MODULE.bazel for each group + - For flat structure, generates score_modules.MODULE.bazel + - To override repository commits, use scripts/known_good/override_known_good_repo.py first. """ ) parser.add_argument( @@ -168,8 +174,13 @@ def main() -> None: ) parser.add_argument( "--output", - default="score_modules.MODULE.bazel", - help="Output file path (default: score_modules.MODULE.bazel)" + default=None, + help="Output file path (only for flat structure, default: score_modules.MODULE.bazel)" + ) + parser.add_argument( + "--output-dir", + default=".", + help="Output directory for grouped structure files (default: current directory)" ) parser.add_argument( "--dry-run", @@ -192,18 +203,17 @@ def main() -> None: default="git", help="Type of override to use (default: git)" ) - + args = parser.parse_args() - + if args.verbose: logging.getLogger().setLevel(logging.INFO) - + known_path = os.path.abspath(args.known) - output_path = os.path.abspath(args.output) - + if not os.path.exists(known_path): raise SystemExit(f"known_good.json not found at {known_path}") - + # Parse repo overrides repo_commit_dict = {} if args.repo_override: @@ -216,7 +226,7 @@ def main() -> None: ) repo_url, commit_hash = entry.split("@", 1) repo_commit_dict[repo_url] = commit_hash - + # Load known_good.json try: known_good = load_known_good(Path(known_path)) @@ -224,26 +234,52 @@ def main() -> None: raise SystemExit(f"ERROR: {e}") except ValueError as e: raise SystemExit(f"ERROR: {e}") - + if not known_good.modules: raise SystemExit("No modules found in known_good.json") - - # Get modules list - modules = list(known_good.modules.values()) - - # Generate file content - content = generate_file_content(args, modules, repo_commit_dict, known_good.timestamp) - - if args.dry_run: - print(f"Dry run: would write to {output_path}\n") - print("---- BEGIN GENERATED CONTENT ----") - print(content) - print("---- END GENERATED CONTENT ----") - print(f"\nGenerated {len(modules)} git_override entries") - else: - with open(output_path, "w", encoding="utf-8") as f: - f.write(content) - print(f"Generated {output_path} with {len(modules)} {args.override_type}_override entries") + + # Generate files based on structure (flat vs grouped) + output_dir = os.path.abspath(args.output_dir) + os.makedirs(output_dir, exist_ok=True) + + generated_files = [] + total_module_count = 0 + + for group_name, group_modules in known_good.modules.items(): + modules = list(group_modules.values()) + + if not modules: + logging.warning(f"Skipping empty group: {group_name}") + continue + + # Determine output filename + if known_good.is_grouped: + # Grouped structure: score_modules_{group}.MODULE.bazel + output_filename = f"score_modules_{group_name}.MODULE.bazel" + else: + # Flat structure: use --output or default + output_filename = args.output if args.output else "score_modules.MODULE.bazel" + + output_path = os.path.join(output_dir, output_filename) + + # Generate file content + content = generate_file_content(args, modules, repo_commit_dict, known_good.timestamp) + + if args.dry_run: + print(f"\nDry run: would write to {output_path}\n") + print("---- BEGIN GENERATED CONTENT ----") + print(content) + print("---- END GENERATED CONTENT ----") + print(f"\nGenerated {len(modules)} {args.override_type}_override entries for group '{group_name}'") + else: + with open(output_path, "w", encoding="utf-8") as f: + f.write(content) + generated_files.append(output_path) + total_module_count += len(modules) + print(f"Generated {output_path} with {len(modules)} {args.override_type}_override entries") + + if not args.dry_run and generated_files: + print(f"\nSuccessfully generated {len(generated_files)} file(s) with {total_module_count} total modules") if __name__ == "__main__": From 3e0c62f1d1d51f93aef0d32fb1f4a0ab2d6df800 Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Thu, 12 Feb 2026 16:28:52 +0100 Subject: [PATCH 03/10] Add generation for long term approach --- integration/MODULE.bazel | 7 +- ...E.bazel => score_basic_bazel.MODULE.bazel} | 9 -- .../bazel_common/score_modules.MODULE.bazel | 38 --------- .../score_modules_target_sw.MODULE.bazel | 74 +++++++++++++++++ .../score_modules_tooling.MODULE.bazel | 68 +++++++++++++++ known_good_next.json | 83 +++++++++++++++++++ 6 files changed, 230 insertions(+), 49 deletions(-) rename integration/bazel_common/{score_basic_tools.MODULE.bazel => score_basic_bazel.MODULE.bazel} (65%) create mode 100644 integration/bazel_common/score_modules_target_sw.MODULE.bazel create mode 100644 integration/bazel_common/score_modules_tooling.MODULE.bazel create mode 100644 known_good_next.json diff --git a/integration/MODULE.bazel b/integration/MODULE.bazel index 66edd21e04..d15d9406c0 100644 --- a/integration/MODULE.bazel +++ b/integration/MODULE.bazel @@ -17,7 +17,7 @@ module( ) # Include common modules -include("//bazel_common:score_basic_tools.MODULE.bazel") +include("//bazel_common:score_basic_bazel.MODULE.bazel") # GCC toolchains include ("//bazel_common:score_gcc_toolchains.MODULE.bazel") # WIP: Not used yet as have problems with IFS toolchain @@ -31,8 +31,11 @@ include ("//bazel_common:score_rust_toolchains.MODULE.bazel") # Python support include("//bazel_common:score_python.MODULE.bazel") +# Score modules tools +include("//bazel_common:score_modules_tooling.MODULE.bazel") + # Score modules -include("//bazel_common:score_modules.MODULE.bazel") +include("//bazel_common:score_modules_target_sw.MODULE.bazel") bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost") archive_override( diff --git a/integration/bazel_common/score_basic_tools.MODULE.bazel b/integration/bazel_common/score_basic_bazel.MODULE.bazel similarity index 65% rename from integration/bazel_common/score_basic_tools.MODULE.bazel rename to integration/bazel_common/score_basic_bazel.MODULE.bazel index 765853afd0..65b9eeca8b 100644 --- a/integration/bazel_common/score_basic_tools.MODULE.bazel +++ b/integration/bazel_common/score_basic_bazel.MODULE.bazel @@ -1,15 +1,6 @@ bazel_dep(name = "rules_shell", version = "0.6.0") bazel_dep(name = "rules_cc", version = "0.1.1") bazel_dep(name = "rules_pkg", version = "1.2.0") -bazel_dep(name = "score_bazel_platforms", version = "0.0.4") -bazel_dep(name = "score_crates", version = "0.0.6") -git_override( - module_name = "score_crates", - remote = "https://github.com/eclipse-score/score-crates.git", - commit = "ff8f312cd8ac221ff7562496c7f4d6b9b5c8ebb9", -) - - bazel_dep(name = "rules_rpm", version = "0.1.0") git_override( module_name = "rules_rpm", diff --git a/integration/bazel_common/score_modules.MODULE.bazel b/integration/bazel_common/score_modules.MODULE.bazel index 1d665001d3..3f2ff2d6cc 100644 --- a/integration/bazel_common/score_modules.MODULE.bazel +++ b/integration/bazel_common/score_modules.MODULE.bazel @@ -1,43 +1,5 @@ -bazel_dep(name = "score_baselibs", version = "0.1.3") -bazel_dep(name = "score_communication", version = "0.1.1",) # EB needs 0.1.2 but others does not work with it -bazel_dep(name = "score_persistency", version = "0.2.1") -bazel_dep(name = "score_scrample", version = "0.1.0") -bazel_dep(name = "score_itf", version = "0.1.0") -bazel_dep(name = "score_orchestrator") -git_override( - module_name = "score_orchestrator", - remote = "https://github.com/eclipse-score/orchestrator.git", - commit = "18e136c34750c5db707f27f917d52efc7541e087", -) -bazel_dep(name = "score_kyron") -git_override( - module_name = "score_kyron", - remote = "https://github.com/eclipse-score/kyron.git", - commit = "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81", -) -git_override( - module_name = "score_persistency", - remote = "https://github.com/eclipse-score/persistency.git", - commit = "0037034bf853e5f955f028fab54ed319fb0441c3", -) -single_version_override( - module_name = "score_baselibs", - version = "0.1.3", - patch_strip = 1, - patches = [ - "//patches/baselibs:003-acl-fixes-for-aarch64.patch", - "//patches/baselibs:0001-RH-exception-header.patch", - "//patches/baselibs:0002-RH-algorithm-header.patch", - ], -) -bazel_dep(name = "score_lifecycle_health") -git_override( - module_name = "score_lifecycle_health", - commit = "84303c2e48c7e8e2481752170efe82d0afd45f1e", - remote = "https://github.com/eclipse-score/lifecycle.git", -) diff --git a/integration/bazel_common/score_modules_target_sw.MODULE.bazel b/integration/bazel_common/score_modules_target_sw.MODULE.bazel new file mode 100644 index 0000000000..efe73e69f8 --- /dev/null +++ b/integration/bazel_common/score_modules_target_sw.MODULE.bazel @@ -0,0 +1,74 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +# Generated from known_good.json at 2026-02-10T21:12:42+00:00Z +# Do not edit manually - use scripts/known_good/update_module_from_known_good.py + +bazel_dep(name = "score_baselibs") +single_version_override( + module_name = "score_baselibs", + version = "0.1.3", + patches = [ + "//patches/baselibs:003-acl-fixes-for-aarch64.patch", + "//patches/baselibs:0001-RH-exception-header.patch", + "//patches/baselibs:0002-RH-algorithm-header.patch", + ], + patch_strip = 1, +) + +bazel_dep(name = "score_baselibs_rust") +git_override( + module_name = "score_baselibs_rust", + remote = "https://github.com/eclipse-score/baselibs_rust.git", + commit = "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c", +) + +bazel_dep(name = "score_communication") +single_version_override( + module_name = "score_communication", + version = "0.1.1", +) + +bazel_dep(name = "score_persistency") +git_override( + module_name = "score_persistency", + remote = "https://github.com/eclipse-score/persistency.git", + commit = "0037034bf853e5f955f028fab54ed319fb0441c3", +) + +bazel_dep(name = "score_orchestrator") +git_override( + module_name = "score_orchestrator", + remote = "https://github.com/eclipse-score/orchestrator.git", + commit = "18e136c34750c5db707f27f917d52efc7541e087", +) + +bazel_dep(name = "score_kyron") +git_override( + module_name = "score_kyron", + remote = "https://github.com/eclipse-score/kyron.git", + commit = "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81", +) + +bazel_dep(name = "score_lifecycle_health") +git_override( + module_name = "score_lifecycle_health", + remote = "https://github.com/eclipse-score/lifecycle.git", + commit = "84303c2e48c7e8e2481752170efe82d0afd45f1e", +) + +bazel_dep(name = "score_scrample") +single_version_override( + module_name = "score_scrample", + version = "0.1.0", +) diff --git a/integration/bazel_common/score_modules_tooling.MODULE.bazel b/integration/bazel_common/score_modules_tooling.MODULE.bazel new file mode 100644 index 0000000000..a816b8eaa9 --- /dev/null +++ b/integration/bazel_common/score_modules_tooling.MODULE.bazel @@ -0,0 +1,68 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +# Generated from known_good.json at 2026-02-10T21:12:42+00:00Z +# Do not edit manually - use scripts/known_good/update_module_from_known_good.py + +bazel_dep(name = "score_crates") +single_version_override( + module_name = "score_crates", + version = "0.0.7", +) + +bazel_dep(name = "score_itf") +single_version_override( + module_name = "score_itf", + version = "0.1.0", +) + +bazel_dep(name = "score_tooling") +git_override( + module_name = "score_tooling", + remote = "https://github.com/eclipse-score/tooling.git", + commit = "17671026150db4b4cc1b35e48af81b97e13685e5", +) + +bazel_dep(name = "score_platform") +git_override( + module_name = "score_platform", + remote = "https://github.com/eclipse-score/score.git", + commit = "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e", +) + +bazel_dep(name = "score_bazel_platforms") +single_version_override( + module_name = "score_bazel_platforms", + version = "0.0.4", +) + +bazel_dep(name = "score_test_scenarios") +git_override( + module_name = "score_test_scenarios", + remote = "https://github.com/eclipse-score/testing_tools.git", + commit = "6b5e85863e8fb5687251c19f5bb81e0a3afdf581", +) + +bazel_dep(name = "score_docs_as_code") +git_override( + module_name = "score_docs_as_code", + remote = "https://github.com/eclipse-score/docs-as-code.git", + commit = "ba006429268e6bd9b856088f7a4217742ed09025", +) + +bazel_dep(name = "score_process") +git_override( + module_name = "score_process", + remote = "https://github.com/eclipse-score/process_description.git", + commit = "6c772cf05a493218a5ac6071361bf0b66c5427b2", +) diff --git a/known_good_next.json b/known_good_next.json new file mode 100644 index 0000000000..84d0ae474f --- /dev/null +++ b/known_good_next.json @@ -0,0 +1,83 @@ +{ + "modules": { + "target_sw": { + "score_baselibs": { + "repo": "https://github.com/eclipse-score/baselibs.git", + "hash": "ffd1c812213c66a436ed982632f6942528b58be8", + "version": "0.1.3", + "bazel_patches": [ + "//patches/baselibs:003-acl-fixes-for-aarch64.patch", + "//patches/baselibs:0001-RH-exception-header.patch", + "//patches/baselibs:0002-RH-algorithm-header.patch" + ] + }, + "score_baselibs_rust": { + "repo": "https://github.com/eclipse-score/baselibs_rust.git", + "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c" + }, + "score_communication": { + "repo": "https://github.com/eclipse-score/communication.git", + "hash": "0c0ea032995eaa766f5bdcec031bc02ee10d4587", + "version": "0.1.1" + }, + "score_persistency": { + "repo": "https://github.com/eclipse-score/persistency.git", + "hash": "0037034bf853e5f955f028fab54ed319fb0441c3" + }, + "score_orchestrator": { + "repo": "https://github.com/eclipse-score/orchestrator.git", + "hash": "18e136c34750c5db707f27f917d52efc7541e087" + }, + "score_kyron": { + "repo": "https://github.com/eclipse-score/kyron.git", + "hash": "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81" + }, + "score_lifecycle_health": { + "repo": "https://github.com/eclipse-score/lifecycle.git", + "hash": "84303c2e48c7e8e2481752170efe82d0afd45f1e" + }, + "score_scrample": { + "repo": "https://github.com/eclipse-score/lifecycle.git", + "version": "0.1.0" + } + }, + "tooling": { + "score_crates": { + "repo": "https://github.com/eclipse-score/score_itf.git", + "version": "0.0.7" + }, + "score_itf": { + "repo": "https://github.com/eclipse-score/score_itf.git", + "version": "0.1.0" + }, + "score_tooling": { + "repo": "https://github.com/eclipse-score/tooling.git", + "hash": "17671026150db4b4cc1b35e48af81b97e13685e5" + }, + "score_platform": { + "repo": "https://github.com/eclipse-score/score.git", + "hash": "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e" + }, + "score_bazel_platforms": { + "repo": "https://github.com/eclipse-score/bazel_platforms.git", + "hash": "3ac1b805ba42b58a13f8960f947b7866c8bcf26c", + "version": "0.0.4" + }, + "score_test_scenarios": { + "repo": "https://github.com/eclipse-score/testing_tools.git", + "hash": "6b5e85863e8fb5687251c19f5bb81e0a3afdf581" + }, + "score_docs_as_code": { + "repo": "https://github.com/eclipse-score/docs-as-code.git", + "hash": "ba006429268e6bd9b856088f7a4217742ed09025" + }, + "score_process": { + "repo": "https://github.com/eclipse-score/process_description.git", + "hash": "6c772cf05a493218a5ac6071361bf0b66c5427b2" + } + } + + + }, + "timestamp": "2026-02-10T21:12:42+00:00Z" +} From 287f06bf098b3c10acc2a35172530bfbfff69490 Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Fri, 13 Feb 2026 09:28:50 +0100 Subject: [PATCH 04/10] Align schema --- integration/.bazelrc | 4 ++ scripts/known_good/models/__init__.py | 4 +- scripts/known_good/models/module.py | 72 +++++++++++++++++++++++---- scripts/quality_runners.py | 45 +++++++++++++++++ 4 files changed, 114 insertions(+), 11 deletions(-) create mode 100644 scripts/quality_runners.py diff --git a/integration/.bazelrc b/integration/.bazelrc index f03197f6ef..8991afa26d 100644 --- a/integration/.bazelrc +++ b/integration/.bazelrc @@ -45,3 +45,7 @@ build:autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux build:autosd-x86_64 --force_pic build:autosd-x86_64 --extra_toolchains=@autosd_10_gcc_repo//:gcc_toolchain_linux_x86_64 build:autosd-x86_64 --extra_toolchains=@rules_rpm//toolchains:linux_x86_64 + + + +test:unit-tests --config=linux-x86_64 \ No newline at end of file diff --git a/scripts/known_good/models/__init__.py b/scripts/known_good/models/__init__.py index 838a6f4b29..c6600de577 100644 --- a/scripts/known_good/models/__init__.py +++ b/scripts/known_good/models/__init__.py @@ -1,5 +1,5 @@ """Models for score reference integration tools.""" -from .module import Module +from .module import Module, Metadata -__all__ = ["Module"] +__all__ = ["Module", "Metadata"] diff --git a/scripts/known_good/models/module.py b/scripts/known_good/models/module.py index 229a02bfe2..8102caf0f1 100644 --- a/scripts/known_good/models/module.py +++ b/scripts/known_good/models/module.py @@ -2,12 +2,54 @@ from __future__ import annotations -from dataclasses import dataclass +from dataclasses import dataclass, field from urllib.parse import urlparse from typing import Any, Dict, List import logging +@dataclass +class Metadata: + """Metadata configuration for a module. + + Attributes: + code_root_path: Root path to the code directory + exclude_test_targets: List of test targets to exclude + langs: List of languages supported (e.g., ["cpp", "rust"]) + """ + code_root_path: str = "//score/..." + exclude_test_targets: list[str] = field(default_factory=lambda: [""]) + langs: list[str] = field(default_factory=lambda: ["cpp", "rust"]) + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> Metadata: + """Create a Metadata instance from a dictionary. + + Args: + data: Dictionary containing metadata configuration + + Returns: + Metadata instance + """ + return cls( + code_root_path=data.get("code_root_path", "//score/..."), + exclude_test_targets=data.get("exclude_test_targets", [""]), + langs=data.get("langs", ["cpp", "rust"]) + ) + + def to_dict(self) -> Dict[str, Any]: + """Convert Metadata instance to dictionary representation. + + Returns: + Dictionary with metadata configuration + """ + return { + "code_root_path": self.code_root_path, + "exclude_test_targets": self.exclude_test_targets, + "langs": self.langs + } + + @dataclass class Module: name: str @@ -15,7 +57,7 @@ class Module: repo: str version: str | None = None bazel_patches: list[str] | None = None - impl_path: Dict[str, Dict[str, Any]] | None = None + metadata: Metadata = field(default_factory=Metadata) branch: str = "main" @classmethod @@ -29,8 +71,13 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: - hash or commit (str): Commit hash - version (str, optional): Module version (when present, hash is ignored) - bazel_patches (list[str], optional): List of patch files for Bazel - - impl_path (dict, optional): Language-specific implementation paths - Example: {"rust": {"code_root_path": "src", "exclude_test_targets": [""]}} + - metadata (dict, optional): Metadata configuration + Example: { + "code_root_path": "path/to/code/root", + "exclude_test_targets": [""], + "langs": ["cpp", "rust"] + } + If not present, uses default Metadata values. - branch (str, optional): Git branch name (default: main) Returns: @@ -42,7 +89,15 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: version = module_data.get("version") # Support both 'bazel_patches' and legacy 'patches' keys bazel_patches = module_data.get("bazel_patches") or module_data.get("patches", []) - impl_path = module_data.get("impl_path") + + # Parse metadata - if not present or is None/empty dict, use defaults + metadata_data = module_data.get("metadata") + if metadata_data is not None: + metadata = Metadata.from_dict(metadata_data) + else: + # If metadata key is missing, create with defaults + metadata = Metadata() + branch = module_data.get("branch", "main") return cls( @@ -51,7 +106,7 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: repo=repo, version=version, bazel_patches=bazel_patches if bazel_patches else None, - impl_path=impl_path, + metadata=metadata, branch=branch ) @@ -105,12 +160,11 @@ def to_dict(self) -> Dict[str, Any]: """ result: Dict[str, Any] = { "repo": self.repo, - "hash": self.hash + "hash": self.hash, + "metadata": self.metadata.to_dict() } if self.version: result["version"] = self.version - if self.impl_path: - result["impl_path"] = self.impl_path if self.bazel_patches: result["bazel_patches"] = self.bazel_patches if self.branch and self.branch != "main": diff --git a/scripts/quality_runners.py b/scripts/quality_runners.py new file mode 100644 index 0000000000..0c578183c9 --- /dev/null +++ b/scripts/quality_runners.py @@ -0,0 +1,45 @@ +from known_good.models.module import Module +from known_good.models.known_good import Path, load_known_good, KnownGood +import subprocess +import pty +import os +import sys + +def run_unit_test(known: KnownGood) -> bool: + print("Running unit tests...") + + master, slave = pty.openpty() + file_obj = os.fdopen(master, "rb", buffering=0) + + for _, value in known.modules["target_sw"].items(): + + call = ["bazel", "test", "--config", "unit-tests", f"@{value.name}{value.metadata.code_root_path}"] + print(f"Testing module: {value.name} - {' '.join(call)}") + + process = subprocess.Popen( + call, + stdout=slave, + stderr=slave, + close_fds=True + ) + + os.close(slave) + + for line in iter(file_obj.readline, b""): + print(line.decode(), end="") + + process.wait() + + break # left until works + + return True + + +def main() -> int: + known = load_known_good(Path("../known_good_next.json")) + run_unit_test(known=known) + + return 0 + +if __name__ == "__main__": + main() From 61f044910f2654e5ef3d6d2f654ab3e3b9fec0c2 Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Fri, 13 Feb 2026 09:56:53 +0100 Subject: [PATCH 05/10] Add pipeline checker --- .github/workflows/known_good_correct.yml | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/known_good_correct.yml diff --git a/.github/workflows/known_good_correct.yml b/.github/workflows/known_good_correct.yml new file mode 100644 index 0000000000..3f9ca5a1a6 --- /dev/null +++ b/.github/workflows/known_good_correct.yml @@ -0,0 +1,42 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +name: Known Good Matches Bazel + +on: + pull_request: + types: [opened, reopened, synchronize] + merge_group: + types: [checks_requested] + +permissions: + contents: write + +jobs: + check-known-good-matches-bazel: + name: Check Known Good Matches with Bazel + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4.2.2 + - name: Check + run: | + ls -la + scripts/known_good/update_module_from_known_good.py --known known_good_next.json --output-dir integration/bazel_common + if git diff --quiet; then + echo "No changes" + else + echo "You have committed not aligned known_good.json to the code. Please run scripts/known_good/update_module_from_known_good.py and commit the changes to the code. Here are the differences:" + git diff + exit 1 + fi From 565bef270bd2c2029037caa25f178a0ca87f507c Mon Sep 17 00:00:00 2001 From: Piotr Korkus Date: Fri, 13 Feb 2026 14:48:24 +0100 Subject: [PATCH 06/10] add external UT python script - executes UTs for external modules based on known_good.json file --- .github/workflows/unit_tests.yml | 9 +- docs/conf.py | 6 + docs/index.rst | 5 + docs/verification/unit_test_summary.md | 9 + docs/verification/verification.rst | 21 ++ known_good_next.json | 59 ++++- scripts/known_good/models/module.py | 324 +++++++++++++------------ scripts/quality_runners.py | 229 ++++++++++++++--- 8 files changed, 462 insertions(+), 200 deletions(-) create mode 100644 docs/verification/unit_test_summary.md create mode 100644 docs/verification/verification.rst diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 4675e727e6..84ac61a464 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -59,16 +59,15 @@ jobs: - name: Bazel build targets run: | - scripts/run_unit_tests.sh - cat _logs/ut_summary.md + cd integration && python3 ../scripts/quality_runners.py --unit-tests - name: Publish build summary if: always() run: | - if [ -f _logs/ut_summary.md ]; then - cat _logs/ut_summary.md >> "$GITHUB_STEP_SUMMARY" + if [ -f docs/verification/unit_test_summary.md ]; then + cat docs/verification/unit_test_summary.md >> "$GITHUB_STEP_SUMMARY" else - echo "No build summary file found (_logs/ut_summary.md)" >> "$GITHUB_STEP_SUMMARY" + echo "No build summary file found (docs/verification/unit_test_summary.md)" >> "$GITHUB_STEP_SUMMARY" fi - name: Upload logs artifact diff --git a/docs/conf.py b/docs/conf.py index f4e526ffc1..f205767343 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,3 +24,9 @@ "sphinxcontrib.plantuml", "score_sphinx_bundle", ] + +# Enable markdown rendering +source_suffix = { + ".rst": "restructuredtext", + ".md": "markdown", +} diff --git a/docs/index.rst b/docs/index.rst index 2969ed29fa..f1d667dc43 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,6 +17,11 @@ Reference Integration Documentation Newest Release Notes: :need:`doc__score_v05_beta_release_note` +Verification Reports Summaries +------------------------------ + +.. toctree:: + verification/verification .. if-collection:: score_platform diff --git a/docs/verification/unit_test_summary.md b/docs/verification/unit_test_summary.md new file mode 100644 index 0000000000..1a152d6919 --- /dev/null +++ b/docs/verification/unit_test_summary.md @@ -0,0 +1,9 @@ +# Unit Test Summary + +| module | passed | failed | skipped | total | +| --- | --- | --- | --- | --- | +| score_baselibs | 24576 | 0 | 29 | 24605 | +| score_baselibs_rust | 7 | 0 | 0 | 7 | +| score_persistency | 1 | 0 | 0 | 1 | +| score_orchestrator | 1 | 0 | 0 | 1 | +| score_kyron | 3 | 0 | 0 | 3 | diff --git a/docs/verification/verification.rst b/docs/verification/verification.rst new file mode 100644 index 0000000000..06b316f195 --- /dev/null +++ b/docs/verification/verification.rst @@ -0,0 +1,21 @@ +.. + # ******************************************************************************* + # 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 + # ******************************************************************************* + +Verification Reports Summaries +============================== + +.. toctree:: + :titlesonly: + + Unit Tests Summary diff --git a/known_good_next.json b/known_good_next.json index 84d0ae474f..a64c6342e3 100644 --- a/known_good_next.json +++ b/known_good_next.json @@ -9,45 +9,84 @@ "//patches/baselibs:003-acl-fixes-for-aarch64.patch", "//patches/baselibs:0001-RH-exception-header.patch", "//patches/baselibs:0002-RH-algorithm-header.patch" - ] + ], + "metadata": { + "exclude_test_targets": [ + "//score/language/safecpp/aborts_upon_exception:abortsuponexception_toolchain_test", + "//score/containers:dynamic_array_test", + "//score/mw/log/configuration:*", + "//score/json/examples:*" + ], + "langs": ["cpp"] + } }, "score_baselibs_rust": { "repo": "https://github.com/eclipse-score/baselibs_rust.git", - "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c" + "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c", + "metadata": { + "code_root_path": "//src/...", + "langs": ["rust"] + } }, "score_communication": { "repo": "https://github.com/eclipse-score/communication.git", "hash": "0c0ea032995eaa766f5bdcec031bc02ee10d4587", - "version": "0.1.1" + "version": "0.1.1", + "metadata": { + "exclude_test_targets": [ + "//score/*" + ] + } }, "score_persistency": { "repo": "https://github.com/eclipse-score/persistency.git", - "hash": "0037034bf853e5f955f028fab54ed319fb0441c3" + "hash": "0037034bf853e5f955f028fab54ed319fb0441c3", + "metadata": { + "code_root_path": "//src/rust/..." + } }, "score_orchestrator": { "repo": "https://github.com/eclipse-score/orchestrator.git", - "hash": "18e136c34750c5db707f27f917d52efc7541e087" + "hash": "18e136c34750c5db707f27f917d52efc7541e087", + "metadata": { + "code_root_path": "//src/..." + } }, "score_kyron": { "repo": "https://github.com/eclipse-score/kyron.git", - "hash": "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81" + "hash": "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81", + "metadata": { + "code_root_path": "//src/..." + } }, "score_lifecycle_health": { "repo": "https://github.com/eclipse-score/lifecycle.git", - "hash": "84303c2e48c7e8e2481752170efe82d0afd45f1e" + "hash": "84303c2e48c7e8e2481752170efe82d0afd45f1e", + "metadata": { + "code_root_path": "//src/..." + } }, "score_scrample": { - "repo": "https://github.com/eclipse-score/lifecycle.git", + "repo": "https://github.com/eclipse-score/scrample.git", "version": "0.1.0" + }, + "score_feo": { + "repo": "https://github.com/eclipse-score/feo.git", + "hash": "4841281ab81aad114cfc86a19a69c029a274f28d", + "metadata": { + "code_root_path": "//...", + "exclude_test_targets": [ + "//:format.check_Rust_with_rustfmt" + ] } } }, "tooling": { "score_crates": { - "repo": "https://github.com/eclipse-score/score_itf.git", + "repo": "https://github.com/eclipse-score/score-crates.git", "version": "0.0.7" }, "score_itf": { - "repo": "https://github.com/eclipse-score/score_itf.git", + "repo": "https://github.com/eclipse-score/itf.git", "version": "0.1.0" }, "score_tooling": { diff --git a/scripts/known_good/models/module.py b/scripts/known_good/models/module.py index 8102caf0f1..bef496695a 100644 --- a/scripts/known_good/models/module.py +++ b/scripts/known_good/models/module.py @@ -2,171 +2,179 @@ from __future__ import annotations +import logging from dataclasses import dataclass, field -from urllib.parse import urlparse from typing import Any, Dict, List -import logging +from urllib.parse import urlparse @dataclass class Metadata: - """Metadata configuration for a module. - - Attributes: - code_root_path: Root path to the code directory - exclude_test_targets: List of test targets to exclude - langs: List of languages supported (e.g., ["cpp", "rust"]) - """ - code_root_path: str = "//score/..." - exclude_test_targets: list[str] = field(default_factory=lambda: [""]) - langs: list[str] = field(default_factory=lambda: ["cpp", "rust"]) - - @classmethod - def from_dict(cls, data: Dict[str, Any]) -> Metadata: - """Create a Metadata instance from a dictionary. - - Args: - data: Dictionary containing metadata configuration - - Returns: - Metadata instance - """ - return cls( - code_root_path=data.get("code_root_path", "//score/..."), - exclude_test_targets=data.get("exclude_test_targets", [""]), - langs=data.get("langs", ["cpp", "rust"]) - ) - - def to_dict(self) -> Dict[str, Any]: - """Convert Metadata instance to dictionary representation. - - Returns: - Dictionary with metadata configuration - """ - return { - "code_root_path": self.code_root_path, - "exclude_test_targets": self.exclude_test_targets, - "langs": self.langs - } + """Metadata configuration for a module. + + Attributes: + code_root_path: Root path to the code directory + exclude_test_targets: List of test targets to exclude + langs: List of languages supported (e.g., ["cpp", "rust"]) + """ + + code_root_path: str = "//score/..." + exclude_test_targets: list[str] = field(default_factory=lambda: []) + langs: list[str] = field(default_factory=lambda: ["cpp", "rust"]) + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> Metadata: + """Create a Metadata instance from a dictionary. + + Args: + data: Dictionary containing metadata configuration + + Returns: + Metadata instance + """ + return cls( + code_root_path=data.get("code_root_path", "//score/..."), + exclude_test_targets=data.get("exclude_test_targets", []), + langs=data.get("langs", ["cpp", "rust"]), + ) + + def to_dict(self) -> Dict[str, Any]: + """Convert Metadata instance to dictionary representation. + + Returns: + Dictionary with metadata configuration + """ + return { + "code_root_path": self.code_root_path, + "exclude_test_targets": self.exclude_test_targets, + "langs": self.langs, + } @dataclass class Module: - name: str - hash: str - repo: str - version: str | None = None - bazel_patches: list[str] | None = None - metadata: Metadata = field(default_factory=Metadata) - branch: str = "main" - - @classmethod - def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: - """Create a Module instance from a dictionary representation. - - Args: - name: The module name - module_data: Dictionary containing module configuration with keys: - - repo (str): Repository URL - - hash or commit (str): Commit hash - - version (str, optional): Module version (when present, hash is ignored) - - bazel_patches (list[str], optional): List of patch files for Bazel - - metadata (dict, optional): Metadata configuration - Example: { - "code_root_path": "path/to/code/root", - "exclude_test_targets": [""], - "langs": ["cpp", "rust"] - } - If not present, uses default Metadata values. - - branch (str, optional): Git branch name (default: main) - - Returns: - Module instance - """ - repo = module_data.get("repo", "") - # Support both 'hash' and 'commit' keys - commit_hash = module_data.get("hash") or module_data.get("commit", "") - version = module_data.get("version") - # Support both 'bazel_patches' and legacy 'patches' keys - bazel_patches = module_data.get("bazel_patches") or module_data.get("patches", []) - - # Parse metadata - if not present or is None/empty dict, use defaults - metadata_data = module_data.get("metadata") - if metadata_data is not None: - metadata = Metadata.from_dict(metadata_data) - else: - # If metadata key is missing, create with defaults - metadata = Metadata() - - branch = module_data.get("branch", "main") - - return cls( - name=name, - hash=commit_hash, - repo=repo, - version=version, - bazel_patches=bazel_patches if bazel_patches else None, - metadata=metadata, - branch=branch - ) - - @classmethod - def parse_modules(cls, modules_dict: Dict[str, Any]) -> List[Module]: - """Parse modules dictionary into Module dataclass instances. - - Args: - modules_dict: Dictionary mapping module names to their configuration data - - Returns: - List of Module instances, skipping invalid modules - """ - modules = [] - for name, module_data in modules_dict.items(): - module = cls.from_dict(name, module_data) - - # Skip modules with missing repo and no version - if not module.repo and not module.version: - logging.warning("Skipping module %s with missing repo", name) - continue - - modules.append(module) - - return modules - - @property - def owner_repo(self) -> str: - """Return owner/repo part extracted from HTTPS GitHub URL.""" - # Examples: - # https://github.com/eclipse-score/logging.git -> eclipse-score/logging - parsed = urlparse(self.repo) - if parsed.netloc != "github.com": - raise ValueError(f"Not a GitHub URL: {self.repo}") - - # Extract path, remove leading slash and .git suffix - path = parsed.path.lstrip("/").removesuffix(".git") - - # Split and validate owner/repo format - parts = path.split("/", 2) # Split max 2 times to get owner and repo - if len(parts) < 2 or not parts[0] or not parts[1]: - raise ValueError(f"Cannot parse owner/repo from: {self.repo}") - - return f"{parts[0]}/{parts[1]}" - - def to_dict(self) -> Dict[str, Any]: - """Convert Module instance to dictionary representation for JSON output. - - Returns: - Dictionary with module configuration - """ - result: Dict[str, Any] = { - "repo": self.repo, - "hash": self.hash, - "metadata": self.metadata.to_dict() - } - if self.version: - result["version"] = self.version - if self.bazel_patches: - result["bazel_patches"] = self.bazel_patches - if self.branch and self.branch != "main": - result["branch"] = self.branch - return result + name: str + hash: str + repo: str + version: str | None = None + bazel_patches: list[str] | None = None + metadata: Metadata = field(default_factory=Metadata) + branch: str = "main" + + @classmethod + def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: + """Create a Module instance from a dictionary representation. + + Args: + name: The module name + module_data: Dictionary containing module configuration with keys: + - repo (str): Repository URL + - hash or commit (str): Commit hash + - version (str, optional): Module version (when present, hash is ignored) + - bazel_patches (list[str], optional): List of patch files for Bazel + - metadata (dict, optional): Metadata configuration + Example: { + "code_root_path": "path/to/code/root", + "exclude_test_targets": [""], + "langs": ["cpp", "rust"] + } + If not present, uses default Metadata values. + - branch (str, optional): Git branch name (default: main) + + Returns: + Module instance + """ + repo = module_data.get("repo", "") + # Support both 'hash' and 'commit' keys + commit_hash = module_data.get("hash") or module_data.get("commit", "") + version = module_data.get("version") + # Support both 'bazel_patches' and legacy 'patches' keys + bazel_patches = module_data.get("bazel_patches") or module_data.get( + "patches", [] + ) + + # Parse metadata - if not present or is None/empty dict, use defaults + metadata_data = module_data.get("metadata") + if metadata_data is not None: + metadata = Metadata.from_dict(metadata_data) + # if any("*" in target for target in metadata.exclude_test_targets): + # raise Exception( + # f"Module {name} has wildcard '*' in exclude_test_targets, which is not allowed. " + # "Please specify explicit test targets to exclude or remove the key if no exclusions are needed." + # ) + else: + # If metadata key is missing, create with defaults + metadata = Metadata() + + branch = module_data.get("branch", "main") + + return cls( + name=name, + hash=commit_hash, + repo=repo, + version=version, + bazel_patches=bazel_patches if bazel_patches else None, + metadata=metadata, + branch=branch, + ) + + @classmethod + def parse_modules(cls, modules_dict: Dict[str, Any]) -> List[Module]: + """Parse modules dictionary into Module dataclass instances. + + Args: + modules_dict: Dictionary mapping module names to their configuration data + + Returns: + List of Module instances, skipping invalid modules + """ + modules = [] + for name, module_data in modules_dict.items(): + module = cls.from_dict(name, module_data) + + # Skip modules with missing repo and no version + if not module.repo and not module.version: + logging.warning("Skipping module %s with missing repo", name) + continue + + modules.append(module) + + return modules + + @property + def owner_repo(self) -> str: + """Return owner/repo part extracted from HTTPS GitHub URL.""" + # Examples: + # https://github.com/eclipse-score/logging.git -> eclipse-score/logging + parsed = urlparse(self.repo) + if parsed.netloc != "github.com": + raise ValueError(f"Not a GitHub URL: {self.repo}") + + # Extract path, remove leading slash and .git suffix + path = parsed.path.lstrip("/").removesuffix(".git") + + # Split and validate owner/repo format + parts = path.split("/", 2) # Split max 2 times to get owner and repo + if len(parts) < 2 or not parts[0] or not parts[1]: + raise ValueError(f"Cannot parse owner/repo from: {self.repo}") + + return f"{parts[0]}/{parts[1]}" + + def to_dict(self) -> Dict[str, Any]: + """Convert Module instance to dictionary representation for JSON output. + + Returns: + Dictionary with module configuration + """ + result: Dict[str, Any] = { + "repo": self.repo, + "hash": self.hash, + "metadata": self.metadata.to_dict(), + } + if self.version: + result["version"] = self.version + if self.bazel_patches: + result["bazel_patches"] = self.bazel_patches + if self.branch and self.branch != "main": + result["branch"] = self.branch + return result diff --git a/scripts/quality_runners.py b/scripts/quality_runners.py index 0c578183c9..15a760e0fa 100644 --- a/scripts/quality_runners.py +++ b/scripts/quality_runners.py @@ -1,45 +1,220 @@ -from known_good.models.module import Module -from known_good.models.known_good import Path, load_known_good, KnownGood -import subprocess -import pty -import os +import argparse +import re +import select import sys +from dataclasses import dataclass +from pprint import pprint +from subprocess import PIPE, Popen -def run_unit_test(known: KnownGood) -> bool: +from known_good.models.known_good import KnownGood, Path, load_known_good + + +@dataclass +class ProcessResult: + stdout: str + stderr: str + exit_code: int + + +def run_unit_test(known: KnownGood) -> int: print("Running unit tests...") + unit_tests_summary = {} + + CURERNTLY_DISABLED_MODULES = [ + "score_communication", + "score_scrample", + "score_logging", + "score_lifecycle_health", + "score_feo", + ] + + for module in known.modules["target_sw"].values(): + if module.name in CURERNTLY_DISABLED_MODULES: + print( + f"Skipping module {module.name} as it is currently disabled for unit tests." + ) + continue + else: + print(f"Testing module: {module.name}") + call = [ + "bazel", + "test", + "--config=unit-tests", + "--test_summary=testcase", + "--test_output=errors", + # "--nocache_test_results", + f"@{module.name}{module.metadata.code_root_path}", + "--", + ] + [ + # Exclude test targets specified in module metadata, if any + f"-@{module.name}{target}" + for target in module.metadata.exclude_test_targets + ] + + print(f"Running command: `{' '.join(call)}`") + result = run_command(call) + unit_tests_summary[module.name] = extract_summary(result.stdout) + unit_tests_summary[module.name] |= {"exit_code": result.exit_code} + + generate_markdown_report( + unit_tests_summary, + output_path=Path(__file__).parent.parent + / "docs/verification/unit_test_summary.md", + ) + print("UNIT TEST EXECUTION SUMMARY".center(120, "=")) + pprint(unit_tests_summary, width=120) - master, slave = pty.openpty() - file_obj = os.fdopen(master, "rb", buffering=0) + return sum(result["exit_code"] for result in unit_tests_summary.values()) - for _, value in known.modules["target_sw"].items(): - - call = ["bazel", "test", "--config", "unit-tests", f"@{value.name}{value.metadata.code_root_path}"] - print(f"Testing module: {value.name} - {' '.join(call)}") - process = subprocess.Popen( - call, - stdout=slave, - stderr=slave, - close_fds=True +def run_coverage(known: KnownGood) -> int: + print("Running coverage analysis...") + ... + + +def generate_markdown_report( + data: dict[str, dict[str, int]], output_path: Path = Path("unit_test_summary.md") +) -> None: + # Keys/columns for the table (ordered) + columns = ["module", "passed", "failed", "skipped", "total"] + + # Build header and separator + title = "# Unit Test Summary\n" + header = "| " + " | ".join(columns) + " |" + separator = "| " + " | ".join("---" for _ in columns) + " |" + + # Build rows + rows = [] + for name, stats in data.items(): + rows.append( + "| " + + " | ".join( + [ + name, + str(stats.get("passed", "")), + str(stats.get("failed", "")), + str(stats.get("skipped", "")), + str(stats.get("total", "")), + ] + ) + + " |" ) - os.close(slave) + md = "\n".join([title, header, separator] + rows + [""]) + output_path.write_text(md) + + +def extract_summary(logs: str) -> dict[str, int]: + summary = {"passed": 0, "failed": 0, "skipped": 0, "total": 0} + + pattern_summary_line = re.compile(r"Test cases: finished.*") + if match := pattern_summary_line.search(logs): + summary_line = match.group(0) + else: + print("Summary line not found in logs.") + return summary + + pattern_passed = re.compile(r"(\d+) passing") + pattern_skipped = re.compile(r"(\d+) skipped") + pattern_failed = re.compile(r"(\d+) failing") + pattern_total = re.compile(r"out of (\d+) test cases") - for line in iter(file_obj.readline, b""): - print(line.decode(), end="") + if match := pattern_passed.search(summary_line): + summary["passed"] = int(match.group(1)) + if match := pattern_skipped.search(summary_line): + summary["skipped"] = int(match.group(1)) + if match := pattern_failed.search(summary_line): + summary["failed"] = int(match.group(1)) + if match := pattern_total.search(summary_line): + summary["total"] = int(match.group(1)) + return summary - process.wait() - - break # left until works - return True +def run_command(command: list[str]) -> ProcessResult: + """ + Run a command and print output live while storing it. + + Args: + command: Command and arguments to execute + + Returns: + ProcessResult containing stdout, stderr, and exit code + """ + + stdout_data = [] + stderr_data = [] + + with Popen(command, stdout=PIPE, stderr=PIPE, text=True, bufsize=1) as p: + # Use select to read from both streams without blocking + streams = { + p.stdout: (stdout_data, sys.stdout), + p.stderr: (stderr_data, sys.stderr), + } + + try: + while p.poll() is None or streams: + # Check which streams have data available + readable, _, _ = select.select(list(streams.keys()), [], [], 0.1) + + for stream in readable: + line = stream.readline() + if line: + storage, output_stream = streams[stream] + print(line, end="", file=output_stream, flush=True) + storage.append(line) + else: + # Stream closed + del streams[stream] + + exit_code = p.returncode + + except Exception: + p.kill() + p.wait() + raise + + return ProcessResult( + stdout="".join(stdout_data), stderr="".join(stderr_data), exit_code=exit_code + ) + + +def parse_arguments() -> argparse.Namespace: + import argparse + + parser = argparse.ArgumentParser(description="Run quality checks on modules.") + parser.add_argument( + "--known-good-path", + type=Path, + default=Path(__file__).parent / "../known_good_next.json", + help="Path to the known good JSON file", + ) + parser.add_argument( + "--unit-tests", + action="store_true", + default=True, + help="Run unit tests for all modules specified in the known good file", + ) + parser.add_argument( + "--coverage", + action="store_true", + help="Run coverage analysis for all modules specified in the known good file", + ) + return parser.parse_args() def main() -> int: - known = load_known_good(Path("../known_good_next.json")) - run_unit_test(known=known) + args = parse_arguments() + + known = load_known_good(args.known_good_path.resolve()) + + return_codes = [] + if args.unit_tests: + return_codes.append(run_unit_test(known=known)) + if args.coverage: + return_codes.append(run_coverage(known=known)) + + return sum(return_codes) - return 0 if __name__ == "__main__": main() From 95277463d1b12d7c479267dde9a645c3749e639f Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Fri, 13 Feb 2026 16:00:00 +0100 Subject: [PATCH 07/10] Move module to top level --- BUILD | 34 --- MODULE.bazel | 60 ++-- README.md | 272 +----------------- {integration => bazel_common}/BUILD | 0 .../bundlers.bzl | 0 .../score_basic_bazel.MODULE.bazel | 0 .../score_gcc_toolchains.MODULE.bazel | 0 .../score_modules.MODULE.bazel | 0 .../score_modules_target_sw.MODULE.bazel | 0 .../score_modules_tooling.MODULE.bazel | 0 .../score_python.MODULE.bazel | 0 .../score_qnx_toolchains.MODULE.bazel | 0 .../score_rust_toolchains.MODULE.bazel | 0 build_config.json | 34 --- .../BUILD | 0 .../README.md | 0 .../configs/BUILD | 0 .../configs/etc/logging.json | 0 .../configs/etc/mw_com_config.json | 0 .../configs/qemu_target_config.json | 0 .../itf/BUILD | 0 .../itf/test_persistency.py | 0 .../itf/test_scrample.py | 0 .../itf/test_ssh.py | 0 .../test_cases/BUILD | 0 .../test_cases/conftest.py | 0 .../test_cases/fit_scenario.py | 0 .../test_cases/pytest.ini | 0 .../test_cases/requirements.txt | 0 .../test_cases/requirements.txt.lock | 0 .../test_cases/test_properties.py | 0 .../test_orchestration_with_persistency.py | 0 .../persistency/test_multiple_kvs_per_app.py | 0 .../test_scenarios/rust/BUILD | 0 .../rust/src/internals/kyron/mod.rs | 0 .../src/internals/kyron/runtime_helper.rs | 0 .../test_scenarios/rust/src/internals/mod.rs | 0 .../src/internals/persistency/kvs_instance.rs | 0 .../internals/persistency/kvs_parameters.rs | 0 .../rust/src/internals/persistency/mod.rs | 0 .../test_scenarios/rust/src/main.rs | 0 .../rust/src/scenarios/basic/mod.rs | 0 .../basic/orchestration_with_persistency.rs | 0 .../test_scenarios/rust/src/scenarios/mod.rs | 0 .../rust/src/scenarios/persistency/mod.rs | 0 .../persistency/multiple_kvs_per_app.rs | 0 .../autosd_x86_64/BUILD.bazel | 0 .../autosd_x86_64/build/.gitignore | 0 .../autosd_x86_64/build/README.md | 0 .../build/files/bluechi-agent-main.conf | 0 .../build/files/bluechi-agent-qm.conf | 0 .../build/files/bluechi-controller.conf | 0 .../build/files/lola-ipc-pub.service | 0 .../build/files/lola-ipc-sub.service | 0 .../autosd_x86_64/build/files/lola-ipc-test | 0 .../build/files/lola-ipc-test.service | 0 .../autosd_x86_64/build/image.aib.yml | 0 .../autosd_x86_64/build/scripts/run_qemu | 0 .../autosd_x86_64/build/vars-devel.yml | 0 .../autosd_x86_64/build/vars.yml | 0 .../images => images}/ebclfsa_aarch64/BUILD | 0 .../ebclfsa_aarch64/README.md | 0 .../docs/system_setup.drawio.png | Bin .../persistency_integration/BUILD | 0 .../persistency_integration/run_qemu.sh | 0 .../scripts/cpp_tests_persistency.sh | 0 .../scrample_integration/BUILD | 0 .../scrample_integration/etc/logging.json | 0 .../etc/mw_com_config.json | 0 .../scrample_integration/run_qemu.sh | 0 .../scrample_integration/src/main.cc | 0 .../images => images}/linux_x86_64/BUILD | 0 .../images => images}/qnx_x86_64/BUILD | 0 .../images => images}/qnx_x86_64/build/BUILD | 0 .../qnx_x86_64/build/init.build | 0 .../qnx_x86_64/build/system.build | 0 .../qnx_x86_64/configs/BUILD | 0 .../qnx_x86_64/configs/dhcpcd.conf | 0 .../qnx_x86_64/configs/group | 0 .../qnx_x86_64/configs/hostname | 0 .../qnx_x86_64/configs/network_capture.sh | 0 .../qnx_x86_64/configs/network_setup.sh | 0 .../qnx_x86_64/configs/network_setup_dhcp.sh | 0 .../qnx_x86_64/configs/passwd | 0 .../qnx_x86_64/configs/pci_hw.cfg | 0 .../qnx_x86_64/configs/pci_server.cfg | 0 .../qnx_x86_64/configs/profile | 0 .../qnx_x86_64/configs/qcrypto.conf | 0 .../qnx_x86_64/configs/ssh_host_rsa_key | 0 .../qnx_x86_64/configs/ssh_host_rsa_key.pub | 0 .../qnx_x86_64/configs/sshd_config | 0 .../qnx_x86_64/configs/startup.sh | 0 integration/.bazelrc | 51 ---- integration/.bazelversion | 1 - integration/MODULE.bazel | 64 ----- integration/README.md | 5 - integration/patches/baselibs/BUILD | 0 integration/scripts/qnx_credential_helper.py | 1 - known_good.json | 72 ----- .../baselibs/0001-RH-exception-header.patch | 0 .../baselibs/0002-RH-algorithm-header.patch | 0 .../baselibs/003-acl-fixes-for-aarch64.patch | 0 .../baselibs}/BUILD | 0 .../baselibs/fix_hard_coded_amd64.patch | 0 .../runners => runners}/docker_x86_64/BUILD | 0 .../docker_x86_64/scripts/BUILD | 0 .../docker_x86_64/scripts/run_docker.sh | 0 .../runners => runners}/qemu_x86_64/BUILD | 0 .../qemu_x86_64/scripts/BUILD | 0 .../qemu_x86_64/scripts/qnx_wireshark.sh | 0 .../qemu_x86_64/scripts/run_qemu.sh | 0 .../scripts/run_qemu_portforward.sh | 0 score_modules.MODULE.bazel | 120 -------- integration/score_starter => score_starter | 0 score_toolchains.MODULE.bazel | 60 ---- {integration/showcases => showcases}/BUILD | 0 .../showcases => showcases}/cli/BUILD | 0 .../showcases => showcases}/cli/README.md | 0 .../showcases => showcases}/cli/main.rs | 0 .../showcases => showcases}/kyron/BUILD | 0 .../kyron/kyron.score.json | 0 .../showcases => showcases}/kyron/main.rs | 0 .../orchestration_persistency/BUILD | 0 .../orchestration_persistency/main.rs | 0 .../orch_per.score.json | 0 .../simple_lifecycle/BUILD | 0 .../simple_lifecycle/configs/BUILD | 0 .../configs/cpp_supervised_app_demo.json | 0 .../simple_lifecycle/configs/hm_demo.json | 0 .../simple_lifecycle/configs/lm_demo.json | 0 .../configs/rust_supervised_app_demo.json | 0 .../simple_lifecycle/lifecycle_signal.sh | 0 .../simple_lifecycle.score.json | 0 .../showcases => showcases}/standalone/BUILD | 0 134 files changed, 34 insertions(+), 740 deletions(-) rename {integration => bazel_common}/BUILD (100%) rename {integration/bazel_common => bazel_common}/bundlers.bzl (100%) rename {integration/bazel_common => bazel_common}/score_basic_bazel.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_gcc_toolchains.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_modules.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_modules_target_sw.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_modules_tooling.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_python.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_qnx_toolchains.MODULE.bazel (100%) rename {integration/bazel_common => bazel_common}/score_rust_toolchains.MODULE.bazel (100%) delete mode 100644 build_config.json rename {integration/bazel_common => feature_integration_tests}/BUILD (100%) rename {integration/feature_integration_tests => feature_integration_tests}/README.md (100%) rename {integration/feature_integration_tests => feature_integration_tests}/configs/BUILD (100%) rename {integration/feature_integration_tests => feature_integration_tests}/configs/etc/logging.json (100%) rename {integration/feature_integration_tests => feature_integration_tests}/configs/etc/mw_com_config.json (100%) rename {integration/feature_integration_tests => feature_integration_tests}/configs/qemu_target_config.json (100%) rename {integration/feature_integration_tests => feature_integration_tests}/itf/BUILD (100%) rename {integration/feature_integration_tests => feature_integration_tests}/itf/test_persistency.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/itf/test_scrample.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/itf/test_ssh.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/BUILD (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/conftest.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/fit_scenario.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/pytest.ini (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/requirements.txt (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/requirements.txt.lock (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/test_properties.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/tests/basic/test_orchestration_with_persistency.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_cases/tests/persistency/test_multiple_kvs_per_app.py (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/BUILD (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/internals/kyron/mod.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/internals/kyron/runtime_helper.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/internals/mod.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/internals/persistency/kvs_instance.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/internals/persistency/kvs_parameters.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/internals/persistency/mod.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/main.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/scenarios/basic/mod.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/scenarios/basic/orchestration_with_persistency.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/scenarios/mod.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/scenarios/persistency/mod.rs (100%) rename {integration/feature_integration_tests => feature_integration_tests}/test_scenarios/rust/src/scenarios/persistency/multiple_kvs_per_app.rs (100%) rename {integration/images => images}/autosd_x86_64/BUILD.bazel (100%) rename {integration/images => images}/autosd_x86_64/build/.gitignore (100%) rename {integration/images => images}/autosd_x86_64/build/README.md (100%) rename {integration/images => images}/autosd_x86_64/build/files/bluechi-agent-main.conf (100%) rename {integration/images => images}/autosd_x86_64/build/files/bluechi-agent-qm.conf (100%) rename {integration/images => images}/autosd_x86_64/build/files/bluechi-controller.conf (100%) rename {integration/images => images}/autosd_x86_64/build/files/lola-ipc-pub.service (100%) rename {integration/images => images}/autosd_x86_64/build/files/lola-ipc-sub.service (100%) rename {integration/images => images}/autosd_x86_64/build/files/lola-ipc-test (100%) rename {integration/images => images}/autosd_x86_64/build/files/lola-ipc-test.service (100%) rename {integration/images => images}/autosd_x86_64/build/image.aib.yml (100%) rename {integration/images => images}/autosd_x86_64/build/scripts/run_qemu (100%) rename {integration/images => images}/autosd_x86_64/build/vars-devel.yml (100%) rename {integration/images => images}/autosd_x86_64/build/vars.yml (100%) rename {integration/images => images}/ebclfsa_aarch64/BUILD (100%) rename {integration/images => images}/ebclfsa_aarch64/README.md (100%) rename {integration/images => images}/ebclfsa_aarch64/docs/system_setup.drawio.png (100%) rename {integration/images => images}/ebclfsa_aarch64/persistency_integration/BUILD (100%) rename {integration/images => images}/ebclfsa_aarch64/persistency_integration/run_qemu.sh (100%) rename {integration/images => images}/ebclfsa_aarch64/persistency_integration/scripts/cpp_tests_persistency.sh (100%) rename {integration/images => images}/ebclfsa_aarch64/scrample_integration/BUILD (100%) rename {integration/images => images}/ebclfsa_aarch64/scrample_integration/etc/logging.json (100%) rename {integration/images => images}/ebclfsa_aarch64/scrample_integration/etc/mw_com_config.json (100%) rename {integration/images => images}/ebclfsa_aarch64/scrample_integration/run_qemu.sh (100%) rename {integration/images => images}/ebclfsa_aarch64/scrample_integration/src/main.cc (100%) rename {integration/images => images}/linux_x86_64/BUILD (100%) rename {integration/images => images}/qnx_x86_64/BUILD (100%) rename {integration/images => images}/qnx_x86_64/build/BUILD (100%) rename {integration/images => images}/qnx_x86_64/build/init.build (100%) rename {integration/images => images}/qnx_x86_64/build/system.build (100%) rename {integration/images => images}/qnx_x86_64/configs/BUILD (100%) rename {integration/images => images}/qnx_x86_64/configs/dhcpcd.conf (100%) rename {integration/images => images}/qnx_x86_64/configs/group (100%) rename {integration/images => images}/qnx_x86_64/configs/hostname (100%) rename {integration/images => images}/qnx_x86_64/configs/network_capture.sh (100%) rename {integration/images => images}/qnx_x86_64/configs/network_setup.sh (100%) rename {integration/images => images}/qnx_x86_64/configs/network_setup_dhcp.sh (100%) rename {integration/images => images}/qnx_x86_64/configs/passwd (100%) rename {integration/images => images}/qnx_x86_64/configs/pci_hw.cfg (100%) rename {integration/images => images}/qnx_x86_64/configs/pci_server.cfg (100%) rename {integration/images => images}/qnx_x86_64/configs/profile (100%) rename {integration/images => images}/qnx_x86_64/configs/qcrypto.conf (100%) rename {integration/images => images}/qnx_x86_64/configs/ssh_host_rsa_key (100%) rename {integration/images => images}/qnx_x86_64/configs/ssh_host_rsa_key.pub (100%) rename {integration/images => images}/qnx_x86_64/configs/sshd_config (100%) rename {integration/images => images}/qnx_x86_64/configs/startup.sh (100%) delete mode 100644 integration/.bazelrc delete mode 100644 integration/.bazelversion delete mode 100644 integration/MODULE.bazel delete mode 100644 integration/README.md delete mode 100644 integration/patches/baselibs/BUILD delete mode 120000 integration/scripts/qnx_credential_helper.py delete mode 100644 known_good.json rename {integration/patches => patches}/baselibs/0001-RH-exception-header.patch (100%) rename {integration/patches => patches}/baselibs/0002-RH-algorithm-header.patch (100%) rename {integration/patches => patches}/baselibs/003-acl-fixes-for-aarch64.patch (100%) rename {integration/feature_integration_tests => patches/baselibs}/BUILD (100%) rename {integration/patches => patches}/baselibs/fix_hard_coded_amd64.patch (100%) rename {integration/runners => runners}/docker_x86_64/BUILD (100%) rename {integration/runners => runners}/docker_x86_64/scripts/BUILD (100%) rename {integration/runners => runners}/docker_x86_64/scripts/run_docker.sh (100%) rename {integration/runners => runners}/qemu_x86_64/BUILD (100%) rename {integration/runners => runners}/qemu_x86_64/scripts/BUILD (100%) rename {integration/runners => runners}/qemu_x86_64/scripts/qnx_wireshark.sh (100%) rename {integration/runners => runners}/qemu_x86_64/scripts/run_qemu.sh (100%) rename {integration/runners => runners}/qemu_x86_64/scripts/run_qemu_portforward.sh (100%) delete mode 100644 score_modules.MODULE.bazel rename integration/score_starter => score_starter (100%) delete mode 100644 score_toolchains.MODULE.bazel rename {integration/showcases => showcases}/BUILD (100%) rename {integration/showcases => showcases}/cli/BUILD (100%) rename {integration/showcases => showcases}/cli/README.md (100%) rename {integration/showcases => showcases}/cli/main.rs (100%) rename {integration/showcases => showcases}/kyron/BUILD (100%) rename {integration/showcases => showcases}/kyron/kyron.score.json (100%) rename {integration/showcases => showcases}/kyron/main.rs (100%) rename {integration/showcases => showcases}/orchestration_persistency/BUILD (100%) rename {integration/showcases => showcases}/orchestration_persistency/main.rs (100%) rename {integration/showcases => showcases}/orchestration_persistency/orch_per.score.json (100%) rename {integration/showcases => showcases}/simple_lifecycle/BUILD (100%) rename {integration/showcases => showcases}/simple_lifecycle/configs/BUILD (100%) rename {integration/showcases => showcases}/simple_lifecycle/configs/cpp_supervised_app_demo.json (100%) rename {integration/showcases => showcases}/simple_lifecycle/configs/hm_demo.json (100%) rename {integration/showcases => showcases}/simple_lifecycle/configs/lm_demo.json (100%) rename {integration/showcases => showcases}/simple_lifecycle/configs/rust_supervised_app_demo.json (100%) rename {integration/showcases => showcases}/simple_lifecycle/lifecycle_signal.sh (100%) rename {integration/showcases => showcases}/simple_lifecycle/simple_lifecycle.score.json (100%) rename {integration/showcases => showcases}/standalone/BUILD (100%) diff --git a/BUILD b/BUILD index 2d6570fe8e..e69de29bb2 100644 --- a/BUILD +++ b/BUILD @@ -1,34 +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 -# ******************************************************************************* - -load("@score_docs_as_code//:docs.bzl", "docs") - -docs( - data = [ - "@score_platform//:needs_json", - #"@score_persistency//:needs_json", # cannot be included, as it does not contain any needs? - #"@score_orchestrator//:needs_json", # some issue about score_toolchains_qnx? - #"@score_communication//:needs_json", # no docs yet? - "@score_feo//:needs_json", - "@score_docs_as_code//:needs_json", - "@score_process//:needs_json", - ], - source_dir = "docs", -) - -# Simple filegroup target to demonstrate the build system works -filegroup( - name = "readme", - srcs = ["README.md"], - visibility = ["//visibility:public"], -) diff --git a/MODULE.bazel b/MODULE.bazel index 2b7e74e276..d15d9406c0 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,53 +10,55 @@ # # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* - module( - name = "score_reference_integration", - version = "0.5.0-beta", + name = "score_ref_int_qnx_x86_64", + version = "0.0.1", compatibility_level = 0, ) -include("//:score_modules.MODULE.bazel") -include("//:score_toolchains.MODULE.bazel") +# Include common modules +include("//bazel_common:score_basic_bazel.MODULE.bazel") -## Python -bazel_dep(name = "rules_python", version = "1.8.3") +# GCC toolchains +include ("//bazel_common:score_gcc_toolchains.MODULE.bazel") # WIP: Not used yet as have problems with IFS toolchain -PYTHON_VERSION = "3.12" +# GCC toolchains +include ("//bazel_common:score_qnx_toolchains.MODULE.bazel") # WIP: Not used yet as have problems with IFS toolchain -python = use_extension("@rules_python//python/extensions:python.bzl", "python") -python.toolchain( - configure_coverage_tool = True, - is_default = True, - python_version = PYTHON_VERSION, -) -use_repo(python) +# Rust toolchains +include ("//bazel_common:score_rust_toolchains.MODULE.bazel") + +# Python support +include("//bazel_common:score_python.MODULE.bazel") + +# Score modules tools +include("//bazel_common:score_modules_tooling.MODULE.bazel") -# Special imports for certain modules +# Score modules +include("//bazel_common:score_modules_target_sw.MODULE.bazel") -# communication module dependencies -# archive_override are not forwarded by bazel_dep, so we need to redefine it here bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost") archive_override( module_name = "rules_boost", - strip_prefix = "rules_boost-master", urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"], + strip_prefix = "rules_boost-master", ) -# git_override are not forwarded by bazel_dep, so we need to redefine it here -bazel_dep(name = "trlc") +# TRLC dependency for requirements traceability +bazel_dep(name = "trlc", version = "0.0.0") git_override( module_name = "trlc", - remote = "https://github.com/bmw-software-engineering/trlc.git", commit = "650b51a47264a4f232b3341f473527710fc32669", # trlc-2.0.2 release + remote = "https://github.com/bmw-software-engineering/trlc.git", ) -# imports for the feature showcase module -bazel_dep(name = "rules_rust", version = "0.67.0") -bazel_dep(name = "score_itf", version = "0.1.0") -bazel_dep(name = "score_crates", version = "0.0.6") -single_version_override( - module_name = "score_crates", - version = "0.0.6", +# Currently required for ifs tooling +bazel_dep(name = "score_toolchains_qnx", version = "0.0.7") +toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx", dev_dependency=True) +toolchains_qnx.sdp( + sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63", + strip_prefix = "installation", + url = "https://www.qnx.com/download/download/79858/installation.tgz", ) +use_repo(toolchains_qnx, "toolchains_qnx_sdp") +use_repo(toolchains_qnx, "toolchains_qnx_ifs") diff --git a/README.md b/README.md index 8a1e2712c0..d9cd398267 100644 --- a/README.md +++ b/README.md @@ -1,271 +1,5 @@ -# Score Reference Integration +# Integration directory -This workspace integrates multiple Eclipse Score modules (baselibs, communication, persistency, orchestrator, feo, etc.) to validate cross-repository builds and detect integration issues early in the development cycle. +## Get started -## Overview - -The reference integration workspace serves as a single Bazel build environment to: -- Validate cross-module dependency graphs -- Detect label and repository boundary issues -- Test toolchain and platform support (Linux, QNX, LLVM/GCC) -- Prepare for release validation workflows - - -## Structure of integration folder - -> [!NOTE] -> For more details about the integration folder structure and deployment showcases, see [integration/README.md](integration/README.md). - -Intention for each folder is described below - -### bazel_common -Used to keep a common bazel functionalities for `images` like: -- toolchain setups -- common tooling deps -- common S-CORE modules deps -- common `.bzl` extensions needed to streamline images - - -### showcases -Used to keep `S-CORE` wide **showcases** implementation to showcase S-CORE in certain deployments (images). Contains: -- proxy target bundling all `standalone` examples from all `S-CORE` repos to deploy then as single bazel target into image -- implementation of certain **showcases** that shall be deployed into images - -#### cli - -Contains a CLI tool to be used on runner that is showcasing the S-CORE functionality. It will provide superior user experience and will guide user to run examples. -How to use it in Your image, look [here](./integration/showcases/cli/README.md) - -### images -Used to keep concrete `images` for given target platform as bazel modules. Each platform shall have it's own folder with name `{platform}_{arch}` ie. `qnx_aarch64`. - -This `images` shall: - - deploy all `showcases` into image so they can be run inside - - other specific code for given `image` - -### runners -Used to keep thin logic ro reuse `runners` between images, like docker runner etc. - - - - - -## Docs - -To generate a full documentation of all integrated modules, run: -```bash -bazel run //:docs_combo_experimental -``` -## Working Builds โœ… - -The following modules build successfully with the `x86_64-linux` configuration: - -### Baselibs -```bash -bazel build --config x86_64-linux @score_baselibs//score/... --verbose_failures -bazel build --config x86_64-linux @score_baselibs//score/... --verbose_failures -``` - -### Communication -```bash -bazel build --config x86_64-linux @score_communication//score/mw/com:com --verbose_failures -``` - -### Persistency -```bash -bazel build --config x86_64-linux \ - @score_persistency//src/cpp/src/... \ - @score_persistency//src/rust/... \ - --verbose_failures -``` - -> Note: Python tests for `@score_persistency` cannot be built from this integration workspace due to Bazel external repository visibility limitations. The pip extension and Python dependencies must be accessed within their defining module. - -### Orchestration and `kyron` - async runtime for Rust - -```bash -bazel build --config x86_64-linux @score_orchestrator//src/... -``` - -### Lifecycle - -```bash -bazel build --config x86_64-linux @score_lifecycle_health//src/... --verbose_failures -``` - - -## Feature showcase examples -The examples that are aiming to showcase features provided by S-CORE are located in `feature_showcase` folder. -You can run them currently for host platform using `--config x86_64-linux`. - -Execute `bazel query //feature_showcase/...` to obtain list of targets that You can run. - - -```bash -bazel build --config x86_64-linux @score_orchestrator//src/... --verbose_failures -``` - -## Operating system integrations - -> [!NOTE] -> Integrations of Eclipse S-CORE into reference operating systems are currently realized as **independent Bazel projects**. -> Please refer to the README documents in the respective sub-directories for details about the specific integration. - -* [QNX](./qnx_qemu/README.md) -* [Red Hat AutoSD](./autosd/build/README.md) -* [Elektrobit corbos Linux for Safety Applications](./ebclfsa/README.md) - -## Workspace support - -You can obtain a complete S-CORE workspace, i.e. a git checkout of all modules from `known_good.json`, on the specific branches / commits, integrated into one Bazel build. -This helps with cross-module development, debugging, and generally "trying out things". - -> [!NOTE] -> The startup of the [S-CORE devcontainer](https://github.com/eclipse-score/devcontainer) [integrated in this repository](.devcontainer/) already installs supported workspace managers and generates the required metadata. -> You can do this manually as well, of course (e.g. if you do not use the devcontainer). -> Take a look at `.devcontainer/prepare_workspace.sh`, which contains the setup script. - -> [!NOTE] -> Not all Bazel targets are supported yet. -> Running `./scripts/integration_test.sh` will work, though. -> Take a look at the [Known Issues](#known-issues-๏ธ) below to see which Bazel targets are available and working. - -The supported workspace managers are: - -| Name | Description | -|------|-------------| -| [Gita](https://github.com/nosarthur/gita) | "a command-line tool to manage multiple git repos" | - -A description of how to use these workspace managers, together with their advantages and drawbacks, is beyond the scope of this document. -In case of doubt, choose the first. - -### Initialization of the workspace - -> [!WARNING] -> This will change the file `score_modules.MODULE.bazel`. -> Do **not** commit these changes! - -1. Switch to local path overrides, using the VSCode Task (`Terminal`->`Run Task...`) "Switch Bazel modules to `local_path_overrides`". - Note that you can switch back to `git_overrides` (the default) using the task "Switch Bazel modules to `git_overrides`" - - **Command line:** - ```bash - python3 scripts/known_good/update_module_from_known_good.py --override-type local_path - ``` - -2. Update workspace metadata from known good, using the VSCode Task "Update workspace metadata from known good". - This will generate the `.gita-workspace.csv` file based on `known_good.json`. - - **Command line:** - ```bash - python3 scripts/known_good/known_good_to_workspace_metadata.py - ``` - -3. Run VSCode Task "<Name>: Generate workspace", e.g. "Gita: Generate workspace". - This will clone all modules using the chosen workspace manager. - The modules will be in sub-directories starting with `score_`. - Note that the usage of different workspace managers is mutually exclusive. - - **Command line:** - ```bash - gita clone --preserve-path --from-file .gita-workspace.csv - ``` - -When you now run Bazel, it will use the local working copies of all modules and not download them from git remotes. -You can make local changes to each module, which will be directly reflected in the next Bazel run. - -## Known Issues โš ๏ธ - -### Orchestrator -**Issue:** Direct toolchain loading at `BUILD:14` -``` -load("@score_toolchains_qnx//rules/fs:ifs.bzl", "qnx_ifs") -``` -**Resolution needed:** Refactor to use proper toolchain resolution instead of direct load statements. - -**Issue:** clang needs to be installed -``` -sudo apt install clang -``` -**Resolution needed:** why is this happening with -extra_toolchains=@gcc_toolchain//:host_gcc_12 ? - -### Communication -**Module:** `score/mw/com/requirements` - -**Issues when building from external repository:** -1. **Label inconsistency:** Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label). Should standardize on local labels within the module. -2. **Outdated path reference:** `runtime_test.cpp:get_path` checks for `safe_posix_platform` (likely obsolete module name) instead of `external/score_communication+/`. - -### Persistency -**Test failures in `src/cpp/tests`:** -1. **Dependency misconfiguration:** `google_benchmark` should not be a dev-only dependency if required by tests. Consider separating benchmark targets. -2. **Compiler-specific issue in `test_kvs.cpp`:** Contains GCC-specific self-move handling that is incorrect and fails with GCC (only builds with LLVM). Needs portable fix or removal of undefined behavior. - -## Build Blockers ๐Ÿšง - -The following builds are currently failing: - -### FEO (Full Build) -```bash -bazel build @feo//... --verbose_failures -``` - -### Persistency (Full Build) -```bash -bazel build --config x86_64-linux @score_persistency//src/... --verbose_failures -``` - -## System Dependencies - -### Required Packages for FEO -Install the following system packages before building FEO: -```bash -sudo apt-get update -sudo apt-get install -y protobuf-compiler libclang-dev -``` - -## Pending Tasks ๐Ÿงช - -- [ ] Add test targets once cross-repository visibility constraints are clarified -- [ ] Normalize third-party label usage across all `BUILD` files -- [ ] Resolve FEO build failures -- [ ] Fix Persistency full build -- [ ] Address compiler-specific issues in test suites - -## Proxy & External Dependencies ๐ŸŒ - -### Current Issue - -The `starpls.bzl` file ([source](https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl)) uses `curl` directly for downloading dependencies, which: -- Bypasses Bazel's managed fetch lifecycle and dependency tracking -- Breaks reproducibility and remote caching expectations -- May fail in corporate proxy-restricted environments - -### Workaround - -Use a `local_path_override` and configure proxy environment variables before building: - -```bash -export http_proxy=http://127.0.0.1:3128 -export https_proxy=http://127.0.0.1:3128 -export HTTP_PROXY=http://127.0.0.1:3128 -export HTTPS_PROXY=http://127.0.0.1:3128 -``` - -Add this to your `MODULE.bazel`: -```python -local_path_override(module_name = "score_tooling", path = "../tooling") -``` - -### Suggested Improvements -- Replace raw `curl` calls with Bazel `http_archive` or `repository_ctx.download` for reproducibility. -- Parameterize proxy usage via environment or Bazel config flags. - -## IDE support - -### Rust - -Use `scripts/generate_rust_analyzer_support.sh` to generate rust_analyzer settings that will let VS Code work. - -## ๐Ÿ—‚ Notes -Keep this file updated as integration issues are resolved. Prefer converting ad-hoc shell steps into Bazel rules or documented scripts under `scripts/` for repeatability. +Simply run `./score_starter` and select which integration You want to run. Once running, You will be guided by our welcome cli to run selected examples. \ No newline at end of file diff --git a/integration/BUILD b/bazel_common/BUILD similarity index 100% rename from integration/BUILD rename to bazel_common/BUILD diff --git a/integration/bazel_common/bundlers.bzl b/bazel_common/bundlers.bzl similarity index 100% rename from integration/bazel_common/bundlers.bzl rename to bazel_common/bundlers.bzl diff --git a/integration/bazel_common/score_basic_bazel.MODULE.bazel b/bazel_common/score_basic_bazel.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_basic_bazel.MODULE.bazel rename to bazel_common/score_basic_bazel.MODULE.bazel diff --git a/integration/bazel_common/score_gcc_toolchains.MODULE.bazel b/bazel_common/score_gcc_toolchains.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_gcc_toolchains.MODULE.bazel rename to bazel_common/score_gcc_toolchains.MODULE.bazel diff --git a/integration/bazel_common/score_modules.MODULE.bazel b/bazel_common/score_modules.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_modules.MODULE.bazel rename to bazel_common/score_modules.MODULE.bazel diff --git a/integration/bazel_common/score_modules_target_sw.MODULE.bazel b/bazel_common/score_modules_target_sw.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_modules_target_sw.MODULE.bazel rename to bazel_common/score_modules_target_sw.MODULE.bazel diff --git a/integration/bazel_common/score_modules_tooling.MODULE.bazel b/bazel_common/score_modules_tooling.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_modules_tooling.MODULE.bazel rename to bazel_common/score_modules_tooling.MODULE.bazel diff --git a/integration/bazel_common/score_python.MODULE.bazel b/bazel_common/score_python.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_python.MODULE.bazel rename to bazel_common/score_python.MODULE.bazel diff --git a/integration/bazel_common/score_qnx_toolchains.MODULE.bazel b/bazel_common/score_qnx_toolchains.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_qnx_toolchains.MODULE.bazel rename to bazel_common/score_qnx_toolchains.MODULE.bazel diff --git a/integration/bazel_common/score_rust_toolchains.MODULE.bazel b/bazel_common/score_rust_toolchains.MODULE.bazel similarity index 100% rename from integration/bazel_common/score_rust_toolchains.MODULE.bazel rename to bazel_common/score_rust_toolchains.MODULE.bazel diff --git a/build_config.json b/build_config.json deleted file mode 100644 index 0c9c0e7005..0000000000 --- a/build_config.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "modules": { - "score_baselibs": { - "build_targets": "@score_baselibs//score/..." - }, - "score_baselibs_rust": { - "build_targets": "@score_baselibs_rust//src/..." - }, - "score_communication": { - "build_targets": "@score_communication//score/mw/com:com" - }, - "score_persistency": { - "build_targets": "@score_persistency//src/cpp/src/... @score_persistency//src/rust/..." - }, - "score_kyron": { - "build_targets": "@score_kyron//src/..." - }, - "score_orchestrator": { - "build_targets": "@score_orchestrator//src/..." - }, - "score_test_scenarios": { - "build_targets": "@score_test_scenarios//test_scenarios_rust:test_scenarios_rust @score_test_scenarios//test_scenarios_cpp:test_scenarios_cpp" - }, - "score_feo": { - "build_targets": "-- @score_feo//feo/... @score_feo//feo-com/... @score_feo//feo-cpp-build/... @score_feo//feo-cpp-macros/... -@score_feo//feo:libfeo_rust -@score_feo//feo:libfeo_recording_rust -@score_feo//feo-com:libfeo_com_rust -@score_feo//examples/rust/..." - }, - "score_logging": { - "build_targets": "@score_logging//score/mw/log" - }, - "score_lifecycle_health": { - "build_targets": "@score_lifecycle_health//src/..." - } - } -} diff --git a/integration/bazel_common/BUILD b/feature_integration_tests/BUILD similarity index 100% rename from integration/bazel_common/BUILD rename to feature_integration_tests/BUILD diff --git a/integration/feature_integration_tests/README.md b/feature_integration_tests/README.md similarity index 100% rename from integration/feature_integration_tests/README.md rename to feature_integration_tests/README.md diff --git a/integration/feature_integration_tests/configs/BUILD b/feature_integration_tests/configs/BUILD similarity index 100% rename from integration/feature_integration_tests/configs/BUILD rename to feature_integration_tests/configs/BUILD diff --git a/integration/feature_integration_tests/configs/etc/logging.json b/feature_integration_tests/configs/etc/logging.json similarity index 100% rename from integration/feature_integration_tests/configs/etc/logging.json rename to feature_integration_tests/configs/etc/logging.json diff --git a/integration/feature_integration_tests/configs/etc/mw_com_config.json b/feature_integration_tests/configs/etc/mw_com_config.json similarity index 100% rename from integration/feature_integration_tests/configs/etc/mw_com_config.json rename to feature_integration_tests/configs/etc/mw_com_config.json diff --git a/integration/feature_integration_tests/configs/qemu_target_config.json b/feature_integration_tests/configs/qemu_target_config.json similarity index 100% rename from integration/feature_integration_tests/configs/qemu_target_config.json rename to feature_integration_tests/configs/qemu_target_config.json diff --git a/integration/feature_integration_tests/itf/BUILD b/feature_integration_tests/itf/BUILD similarity index 100% rename from integration/feature_integration_tests/itf/BUILD rename to feature_integration_tests/itf/BUILD diff --git a/integration/feature_integration_tests/itf/test_persistency.py b/feature_integration_tests/itf/test_persistency.py similarity index 100% rename from integration/feature_integration_tests/itf/test_persistency.py rename to feature_integration_tests/itf/test_persistency.py diff --git a/integration/feature_integration_tests/itf/test_scrample.py b/feature_integration_tests/itf/test_scrample.py similarity index 100% rename from integration/feature_integration_tests/itf/test_scrample.py rename to feature_integration_tests/itf/test_scrample.py diff --git a/integration/feature_integration_tests/itf/test_ssh.py b/feature_integration_tests/itf/test_ssh.py similarity index 100% rename from integration/feature_integration_tests/itf/test_ssh.py rename to feature_integration_tests/itf/test_ssh.py diff --git a/integration/feature_integration_tests/test_cases/BUILD b/feature_integration_tests/test_cases/BUILD similarity index 100% rename from integration/feature_integration_tests/test_cases/BUILD rename to feature_integration_tests/test_cases/BUILD diff --git a/integration/feature_integration_tests/test_cases/conftest.py b/feature_integration_tests/test_cases/conftest.py similarity index 100% rename from integration/feature_integration_tests/test_cases/conftest.py rename to feature_integration_tests/test_cases/conftest.py diff --git a/integration/feature_integration_tests/test_cases/fit_scenario.py b/feature_integration_tests/test_cases/fit_scenario.py similarity index 100% rename from integration/feature_integration_tests/test_cases/fit_scenario.py rename to feature_integration_tests/test_cases/fit_scenario.py diff --git a/integration/feature_integration_tests/test_cases/pytest.ini b/feature_integration_tests/test_cases/pytest.ini similarity index 100% rename from integration/feature_integration_tests/test_cases/pytest.ini rename to feature_integration_tests/test_cases/pytest.ini diff --git a/integration/feature_integration_tests/test_cases/requirements.txt b/feature_integration_tests/test_cases/requirements.txt similarity index 100% rename from integration/feature_integration_tests/test_cases/requirements.txt rename to feature_integration_tests/test_cases/requirements.txt diff --git a/integration/feature_integration_tests/test_cases/requirements.txt.lock b/feature_integration_tests/test_cases/requirements.txt.lock similarity index 100% rename from integration/feature_integration_tests/test_cases/requirements.txt.lock rename to feature_integration_tests/test_cases/requirements.txt.lock diff --git a/integration/feature_integration_tests/test_cases/test_properties.py b/feature_integration_tests/test_cases/test_properties.py similarity index 100% rename from integration/feature_integration_tests/test_cases/test_properties.py rename to feature_integration_tests/test_cases/test_properties.py diff --git a/integration/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py b/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py similarity index 100% rename from integration/feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py rename to feature_integration_tests/test_cases/tests/basic/test_orchestration_with_persistency.py diff --git a/integration/feature_integration_tests/test_cases/tests/persistency/test_multiple_kvs_per_app.py b/feature_integration_tests/test_cases/tests/persistency/test_multiple_kvs_per_app.py similarity index 100% rename from integration/feature_integration_tests/test_cases/tests/persistency/test_multiple_kvs_per_app.py rename to feature_integration_tests/test_cases/tests/persistency/test_multiple_kvs_per_app.py diff --git a/integration/feature_integration_tests/test_scenarios/rust/BUILD b/feature_integration_tests/test_scenarios/rust/BUILD similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/BUILD rename to feature_integration_tests/test_scenarios/rust/BUILD diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/internals/kyron/mod.rs b/feature_integration_tests/test_scenarios/rust/src/internals/kyron/mod.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/internals/kyron/mod.rs rename to feature_integration_tests/test_scenarios/rust/src/internals/kyron/mod.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/internals/kyron/runtime_helper.rs b/feature_integration_tests/test_scenarios/rust/src/internals/kyron/runtime_helper.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/internals/kyron/runtime_helper.rs rename to feature_integration_tests/test_scenarios/rust/src/internals/kyron/runtime_helper.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/internals/mod.rs b/feature_integration_tests/test_scenarios/rust/src/internals/mod.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/internals/mod.rs rename to feature_integration_tests/test_scenarios/rust/src/internals/mod.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_instance.rs b/feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_instance.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_instance.rs rename to feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_instance.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_parameters.rs b/feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_parameters.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_parameters.rs rename to feature_integration_tests/test_scenarios/rust/src/internals/persistency/kvs_parameters.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/internals/persistency/mod.rs b/feature_integration_tests/test_scenarios/rust/src/internals/persistency/mod.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/internals/persistency/mod.rs rename to feature_integration_tests/test_scenarios/rust/src/internals/persistency/mod.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/main.rs b/feature_integration_tests/test_scenarios/rust/src/main.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/main.rs rename to feature_integration_tests/test_scenarios/rust/src/main.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/scenarios/basic/mod.rs b/feature_integration_tests/test_scenarios/rust/src/scenarios/basic/mod.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/scenarios/basic/mod.rs rename to feature_integration_tests/test_scenarios/rust/src/scenarios/basic/mod.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/scenarios/basic/orchestration_with_persistency.rs b/feature_integration_tests/test_scenarios/rust/src/scenarios/basic/orchestration_with_persistency.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/scenarios/basic/orchestration_with_persistency.rs rename to feature_integration_tests/test_scenarios/rust/src/scenarios/basic/orchestration_with_persistency.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/scenarios/mod.rs b/feature_integration_tests/test_scenarios/rust/src/scenarios/mod.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/scenarios/mod.rs rename to feature_integration_tests/test_scenarios/rust/src/scenarios/mod.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/mod.rs b/feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/mod.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/mod.rs rename to feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/mod.rs diff --git a/integration/feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/multiple_kvs_per_app.rs b/feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/multiple_kvs_per_app.rs similarity index 100% rename from integration/feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/multiple_kvs_per_app.rs rename to feature_integration_tests/test_scenarios/rust/src/scenarios/persistency/multiple_kvs_per_app.rs diff --git a/integration/images/autosd_x86_64/BUILD.bazel b/images/autosd_x86_64/BUILD.bazel similarity index 100% rename from integration/images/autosd_x86_64/BUILD.bazel rename to images/autosd_x86_64/BUILD.bazel diff --git a/integration/images/autosd_x86_64/build/.gitignore b/images/autosd_x86_64/build/.gitignore similarity index 100% rename from integration/images/autosd_x86_64/build/.gitignore rename to images/autosd_x86_64/build/.gitignore diff --git a/integration/images/autosd_x86_64/build/README.md b/images/autosd_x86_64/build/README.md similarity index 100% rename from integration/images/autosd_x86_64/build/README.md rename to images/autosd_x86_64/build/README.md diff --git a/integration/images/autosd_x86_64/build/files/bluechi-agent-main.conf b/images/autosd_x86_64/build/files/bluechi-agent-main.conf similarity index 100% rename from integration/images/autosd_x86_64/build/files/bluechi-agent-main.conf rename to images/autosd_x86_64/build/files/bluechi-agent-main.conf diff --git a/integration/images/autosd_x86_64/build/files/bluechi-agent-qm.conf b/images/autosd_x86_64/build/files/bluechi-agent-qm.conf similarity index 100% rename from integration/images/autosd_x86_64/build/files/bluechi-agent-qm.conf rename to images/autosd_x86_64/build/files/bluechi-agent-qm.conf diff --git a/integration/images/autosd_x86_64/build/files/bluechi-controller.conf b/images/autosd_x86_64/build/files/bluechi-controller.conf similarity index 100% rename from integration/images/autosd_x86_64/build/files/bluechi-controller.conf rename to images/autosd_x86_64/build/files/bluechi-controller.conf diff --git a/integration/images/autosd_x86_64/build/files/lola-ipc-pub.service b/images/autosd_x86_64/build/files/lola-ipc-pub.service similarity index 100% rename from integration/images/autosd_x86_64/build/files/lola-ipc-pub.service rename to images/autosd_x86_64/build/files/lola-ipc-pub.service diff --git a/integration/images/autosd_x86_64/build/files/lola-ipc-sub.service b/images/autosd_x86_64/build/files/lola-ipc-sub.service similarity index 100% rename from integration/images/autosd_x86_64/build/files/lola-ipc-sub.service rename to images/autosd_x86_64/build/files/lola-ipc-sub.service diff --git a/integration/images/autosd_x86_64/build/files/lola-ipc-test b/images/autosd_x86_64/build/files/lola-ipc-test similarity index 100% rename from integration/images/autosd_x86_64/build/files/lola-ipc-test rename to images/autosd_x86_64/build/files/lola-ipc-test diff --git a/integration/images/autosd_x86_64/build/files/lola-ipc-test.service b/images/autosd_x86_64/build/files/lola-ipc-test.service similarity index 100% rename from integration/images/autosd_x86_64/build/files/lola-ipc-test.service rename to images/autosd_x86_64/build/files/lola-ipc-test.service diff --git a/integration/images/autosd_x86_64/build/image.aib.yml b/images/autosd_x86_64/build/image.aib.yml similarity index 100% rename from integration/images/autosd_x86_64/build/image.aib.yml rename to images/autosd_x86_64/build/image.aib.yml diff --git a/integration/images/autosd_x86_64/build/scripts/run_qemu b/images/autosd_x86_64/build/scripts/run_qemu similarity index 100% rename from integration/images/autosd_x86_64/build/scripts/run_qemu rename to images/autosd_x86_64/build/scripts/run_qemu diff --git a/integration/images/autosd_x86_64/build/vars-devel.yml b/images/autosd_x86_64/build/vars-devel.yml similarity index 100% rename from integration/images/autosd_x86_64/build/vars-devel.yml rename to images/autosd_x86_64/build/vars-devel.yml diff --git a/integration/images/autosd_x86_64/build/vars.yml b/images/autosd_x86_64/build/vars.yml similarity index 100% rename from integration/images/autosd_x86_64/build/vars.yml rename to images/autosd_x86_64/build/vars.yml diff --git a/integration/images/ebclfsa_aarch64/BUILD b/images/ebclfsa_aarch64/BUILD similarity index 100% rename from integration/images/ebclfsa_aarch64/BUILD rename to images/ebclfsa_aarch64/BUILD diff --git a/integration/images/ebclfsa_aarch64/README.md b/images/ebclfsa_aarch64/README.md similarity index 100% rename from integration/images/ebclfsa_aarch64/README.md rename to images/ebclfsa_aarch64/README.md diff --git a/integration/images/ebclfsa_aarch64/docs/system_setup.drawio.png b/images/ebclfsa_aarch64/docs/system_setup.drawio.png similarity index 100% rename from integration/images/ebclfsa_aarch64/docs/system_setup.drawio.png rename to images/ebclfsa_aarch64/docs/system_setup.drawio.png diff --git a/integration/images/ebclfsa_aarch64/persistency_integration/BUILD b/images/ebclfsa_aarch64/persistency_integration/BUILD similarity index 100% rename from integration/images/ebclfsa_aarch64/persistency_integration/BUILD rename to images/ebclfsa_aarch64/persistency_integration/BUILD diff --git a/integration/images/ebclfsa_aarch64/persistency_integration/run_qemu.sh b/images/ebclfsa_aarch64/persistency_integration/run_qemu.sh similarity index 100% rename from integration/images/ebclfsa_aarch64/persistency_integration/run_qemu.sh rename to images/ebclfsa_aarch64/persistency_integration/run_qemu.sh diff --git a/integration/images/ebclfsa_aarch64/persistency_integration/scripts/cpp_tests_persistency.sh b/images/ebclfsa_aarch64/persistency_integration/scripts/cpp_tests_persistency.sh similarity index 100% rename from integration/images/ebclfsa_aarch64/persistency_integration/scripts/cpp_tests_persistency.sh rename to images/ebclfsa_aarch64/persistency_integration/scripts/cpp_tests_persistency.sh diff --git a/integration/images/ebclfsa_aarch64/scrample_integration/BUILD b/images/ebclfsa_aarch64/scrample_integration/BUILD similarity index 100% rename from integration/images/ebclfsa_aarch64/scrample_integration/BUILD rename to images/ebclfsa_aarch64/scrample_integration/BUILD diff --git a/integration/images/ebclfsa_aarch64/scrample_integration/etc/logging.json b/images/ebclfsa_aarch64/scrample_integration/etc/logging.json similarity index 100% rename from integration/images/ebclfsa_aarch64/scrample_integration/etc/logging.json rename to images/ebclfsa_aarch64/scrample_integration/etc/logging.json diff --git a/integration/images/ebclfsa_aarch64/scrample_integration/etc/mw_com_config.json b/images/ebclfsa_aarch64/scrample_integration/etc/mw_com_config.json similarity index 100% rename from integration/images/ebclfsa_aarch64/scrample_integration/etc/mw_com_config.json rename to images/ebclfsa_aarch64/scrample_integration/etc/mw_com_config.json diff --git a/integration/images/ebclfsa_aarch64/scrample_integration/run_qemu.sh b/images/ebclfsa_aarch64/scrample_integration/run_qemu.sh similarity index 100% rename from integration/images/ebclfsa_aarch64/scrample_integration/run_qemu.sh rename to images/ebclfsa_aarch64/scrample_integration/run_qemu.sh diff --git a/integration/images/ebclfsa_aarch64/scrample_integration/src/main.cc b/images/ebclfsa_aarch64/scrample_integration/src/main.cc similarity index 100% rename from integration/images/ebclfsa_aarch64/scrample_integration/src/main.cc rename to images/ebclfsa_aarch64/scrample_integration/src/main.cc diff --git a/integration/images/linux_x86_64/BUILD b/images/linux_x86_64/BUILD similarity index 100% rename from integration/images/linux_x86_64/BUILD rename to images/linux_x86_64/BUILD diff --git a/integration/images/qnx_x86_64/BUILD b/images/qnx_x86_64/BUILD similarity index 100% rename from integration/images/qnx_x86_64/BUILD rename to images/qnx_x86_64/BUILD diff --git a/integration/images/qnx_x86_64/build/BUILD b/images/qnx_x86_64/build/BUILD similarity index 100% rename from integration/images/qnx_x86_64/build/BUILD rename to images/qnx_x86_64/build/BUILD diff --git a/integration/images/qnx_x86_64/build/init.build b/images/qnx_x86_64/build/init.build similarity index 100% rename from integration/images/qnx_x86_64/build/init.build rename to images/qnx_x86_64/build/init.build diff --git a/integration/images/qnx_x86_64/build/system.build b/images/qnx_x86_64/build/system.build similarity index 100% rename from integration/images/qnx_x86_64/build/system.build rename to images/qnx_x86_64/build/system.build diff --git a/integration/images/qnx_x86_64/configs/BUILD b/images/qnx_x86_64/configs/BUILD similarity index 100% rename from integration/images/qnx_x86_64/configs/BUILD rename to images/qnx_x86_64/configs/BUILD diff --git a/integration/images/qnx_x86_64/configs/dhcpcd.conf b/images/qnx_x86_64/configs/dhcpcd.conf similarity index 100% rename from integration/images/qnx_x86_64/configs/dhcpcd.conf rename to images/qnx_x86_64/configs/dhcpcd.conf diff --git a/integration/images/qnx_x86_64/configs/group b/images/qnx_x86_64/configs/group similarity index 100% rename from integration/images/qnx_x86_64/configs/group rename to images/qnx_x86_64/configs/group diff --git a/integration/images/qnx_x86_64/configs/hostname b/images/qnx_x86_64/configs/hostname similarity index 100% rename from integration/images/qnx_x86_64/configs/hostname rename to images/qnx_x86_64/configs/hostname diff --git a/integration/images/qnx_x86_64/configs/network_capture.sh b/images/qnx_x86_64/configs/network_capture.sh similarity index 100% rename from integration/images/qnx_x86_64/configs/network_capture.sh rename to images/qnx_x86_64/configs/network_capture.sh diff --git a/integration/images/qnx_x86_64/configs/network_setup.sh b/images/qnx_x86_64/configs/network_setup.sh similarity index 100% rename from integration/images/qnx_x86_64/configs/network_setup.sh rename to images/qnx_x86_64/configs/network_setup.sh diff --git a/integration/images/qnx_x86_64/configs/network_setup_dhcp.sh b/images/qnx_x86_64/configs/network_setup_dhcp.sh similarity index 100% rename from integration/images/qnx_x86_64/configs/network_setup_dhcp.sh rename to images/qnx_x86_64/configs/network_setup_dhcp.sh diff --git a/integration/images/qnx_x86_64/configs/passwd b/images/qnx_x86_64/configs/passwd similarity index 100% rename from integration/images/qnx_x86_64/configs/passwd rename to images/qnx_x86_64/configs/passwd diff --git a/integration/images/qnx_x86_64/configs/pci_hw.cfg b/images/qnx_x86_64/configs/pci_hw.cfg similarity index 100% rename from integration/images/qnx_x86_64/configs/pci_hw.cfg rename to images/qnx_x86_64/configs/pci_hw.cfg diff --git a/integration/images/qnx_x86_64/configs/pci_server.cfg b/images/qnx_x86_64/configs/pci_server.cfg similarity index 100% rename from integration/images/qnx_x86_64/configs/pci_server.cfg rename to images/qnx_x86_64/configs/pci_server.cfg diff --git a/integration/images/qnx_x86_64/configs/profile b/images/qnx_x86_64/configs/profile similarity index 100% rename from integration/images/qnx_x86_64/configs/profile rename to images/qnx_x86_64/configs/profile diff --git a/integration/images/qnx_x86_64/configs/qcrypto.conf b/images/qnx_x86_64/configs/qcrypto.conf similarity index 100% rename from integration/images/qnx_x86_64/configs/qcrypto.conf rename to images/qnx_x86_64/configs/qcrypto.conf diff --git a/integration/images/qnx_x86_64/configs/ssh_host_rsa_key b/images/qnx_x86_64/configs/ssh_host_rsa_key similarity index 100% rename from integration/images/qnx_x86_64/configs/ssh_host_rsa_key rename to images/qnx_x86_64/configs/ssh_host_rsa_key diff --git a/integration/images/qnx_x86_64/configs/ssh_host_rsa_key.pub b/images/qnx_x86_64/configs/ssh_host_rsa_key.pub similarity index 100% rename from integration/images/qnx_x86_64/configs/ssh_host_rsa_key.pub rename to images/qnx_x86_64/configs/ssh_host_rsa_key.pub diff --git a/integration/images/qnx_x86_64/configs/sshd_config b/images/qnx_x86_64/configs/sshd_config similarity index 100% rename from integration/images/qnx_x86_64/configs/sshd_config rename to images/qnx_x86_64/configs/sshd_config diff --git a/integration/images/qnx_x86_64/configs/startup.sh b/images/qnx_x86_64/configs/startup.sh similarity index 100% rename from integration/images/qnx_x86_64/configs/startup.sh rename to images/qnx_x86_64/configs/startup.sh diff --git a/integration/.bazelrc b/integration/.bazelrc deleted file mode 100644 index 8991afa26d..0000000000 --- a/integration/.bazelrc +++ /dev/null @@ -1,51 +0,0 @@ -common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ -common --registry=https://bcr.bazel.build -common --credential_helper=*.qnx.com=%workspace%/scripts/qnx_credential_helper.py -common --credential_helper_timeout="60s" - -build:_common --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False -build:_common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False -build:_common --@score_baselibs//score/json:base_library=nlohmann -build:_common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False -build:_common --@score_communication//score/mw/com/flags:tracing_library=stub -build:_common --cxxopt=-Wno-error=mismatched-new-delete -build:_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix -build:_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu -build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix - -build:qnx-x86_64 --config=_common -build:qnx-x86_64 --noexperimental_merged_skyframe_analysis_execution -build:qnx-x86_64 --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 -build:qnx-x86_64 --incompatible_enable_cc_toolchain_resolution -build:qnx-x86_64 --incompatible_strict_action_env -build:qnx-x86_64 --sandbox_writable_path=/var/tmp -build:qnx-x86_64 --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix -build:qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix -build:qnx-x86_64 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64 -build:qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 - -build:itf-qnx-x86_64 --config=qnx-x86_64 -build:itf-qnx-x86_64 --run_under=@score_itf//scripts:run_under_qemu -build:itf-qnx-x86_64 --test_arg="--qemu" -build:itf-qnx-x86_64 --test_arg="--os=qnx" - - -build:linux-x86_64 --config=_common -build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix -build:linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix - -build:eb-aarch64 --config=_common -build:eb-aarch64 --extra_toolchains=@gcc_toolchain//:aarch64_gcc_13 -build:eb-aarch64 --platforms=@score_toolchains_gcc//platforms:aarch64-linux -build:eb-aarch64 --spawn_strategy=local - - -build:autosd-x86_64 --config=_common -build:autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux -build:autosd-x86_64 --force_pic -build:autosd-x86_64 --extra_toolchains=@autosd_10_gcc_repo//:gcc_toolchain_linux_x86_64 -build:autosd-x86_64 --extra_toolchains=@rules_rpm//toolchains:linux_x86_64 - - - -test:unit-tests --config=linux-x86_64 \ No newline at end of file diff --git a/integration/.bazelversion b/integration/.bazelversion deleted file mode 100644 index e7fdef7e2e..0000000000 --- a/integration/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -8.4.2 diff --git a/integration/MODULE.bazel b/integration/MODULE.bazel deleted file mode 100644 index d15d9406c0..0000000000 --- a/integration/MODULE.bazel +++ /dev/null @@ -1,64 +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 -# ******************************************************************************* -module( - name = "score_ref_int_qnx_x86_64", - version = "0.0.1", - compatibility_level = 0, -) - -# Include common modules -include("//bazel_common:score_basic_bazel.MODULE.bazel") - -# GCC toolchains -include ("//bazel_common:score_gcc_toolchains.MODULE.bazel") # WIP: Not used yet as have problems with IFS toolchain - -# GCC toolchains -include ("//bazel_common:score_qnx_toolchains.MODULE.bazel") # WIP: Not used yet as have problems with IFS toolchain - -# Rust toolchains -include ("//bazel_common:score_rust_toolchains.MODULE.bazel") - -# Python support -include("//bazel_common:score_python.MODULE.bazel") - -# Score modules tools -include("//bazel_common:score_modules_tooling.MODULE.bazel") - -# Score modules -include("//bazel_common:score_modules_target_sw.MODULE.bazel") - -bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost") -archive_override( - module_name = "rules_boost", - urls = ["https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz"], - strip_prefix = "rules_boost-master", -) - -# TRLC dependency for requirements traceability -bazel_dep(name = "trlc", version = "0.0.0") -git_override( - module_name = "trlc", - commit = "650b51a47264a4f232b3341f473527710fc32669", # trlc-2.0.2 release - remote = "https://github.com/bmw-software-engineering/trlc.git", -) - -# Currently required for ifs tooling -bazel_dep(name = "score_toolchains_qnx", version = "0.0.7") -toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx", dev_dependency=True) -toolchains_qnx.sdp( - sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63", - strip_prefix = "installation", - url = "https://www.qnx.com/download/download/79858/installation.tgz", -) -use_repo(toolchains_qnx, "toolchains_qnx_sdp") -use_repo(toolchains_qnx, "toolchains_qnx_ifs") diff --git a/integration/README.md b/integration/README.md deleted file mode 100644 index d9cd398267..0000000000 --- a/integration/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Integration directory - -## Get started - -Simply run `./score_starter` and select which integration You want to run. Once running, You will be guided by our welcome cli to run selected examples. \ No newline at end of file diff --git a/integration/patches/baselibs/BUILD b/integration/patches/baselibs/BUILD deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/integration/scripts/qnx_credential_helper.py b/integration/scripts/qnx_credential_helper.py deleted file mode 120000 index 6b0b73f578..0000000000 --- a/integration/scripts/qnx_credential_helper.py +++ /dev/null @@ -1 +0,0 @@ -../../.github/tools/qnx_credential_helper.py \ No newline at end of file diff --git a/known_good.json b/known_good.json deleted file mode 100644 index c25ff0c5f3..0000000000 --- a/known_good.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "modules": { - "target_sw": { - "score_baselibs": { - "repo": "https://github.com/eclipse-score/baselibs.git", - "hash": "ffd1c812213c66a436ed982632f6942528b58be8" - }, - "score_baselibs_rust": { - "repo": "https://github.com/eclipse-score/baselibs_rust.git", - "hash": "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c" - }, - "score_communication": { - "repo": "https://github.com/eclipse-score/communication.git", - "hash": "0c0ea032995eaa766f5bdcec031bc02ee10d4587" - }, - "score_logging": { - "repo": "https://github.com/eclipse-score/logging.git", - "hash": "2b3e56cf12cf582d0c0a235cad3d1d9b9fc1e494" - }, - "score_persistency": { - "repo": "https://github.com/eclipse-score/persistency.git", - "hash": "9c1f0c1b1cd9b49621ecf4f9d541ded100fe2c08" - }, - "score_orchestrator": { - "repo": "https://github.com/eclipse-score/orchestrator.git", - "hash": "fd6e21820a361b0c5ab69553f01bd68174d89ffd" - }, - "score_kyron": { - "repo": "https://github.com/eclipse-score/kyron.git", - "hash": "d146401db4557d840850a7b5fc21b0f4fc8aac20" - }, - "score_feo": { - "repo": "https://github.com/eclipse-score/feo.git", - "hash": "4841281ab81aad114cfc86a19a69c029a274f28d", - "branch": "candidate_v0.5" - }, - "score_lifecycle_health": { - "repo": "https://github.com/eclipse-score/lifecycle.git", - "hash": "297808cf7c0013e08a0982133a0add1d9b1a9d9e" - } - }, - "tooling": { - "score_tooling": { - "repo": "https://github.com/eclipse-score/tooling.git", - "hash": "17671026150db4b4cc1b35e48af81b97e13685e5" - }, - "score_platform": { - "repo": "https://github.com/eclipse-score/score.git", - "hash": "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e" - }, - "score_bazel_platforms": { - "repo": "https://github.com/eclipse-score/bazel_platforms.git", - "hash": "3ac1b805ba42b58a13f8960f947b7866c8bcf26c" - }, - "score_test_scenarios": { - "repo": "https://github.com/eclipse-score/testing_tools.git", - "hash": "6b5e85863e8fb5687251c19f5bb81e0a3afdf581" - }, - "score_docs_as_code": { - "repo": "https://github.com/eclipse-score/docs-as-code.git", - "hash": "ba006429268e6bd9b856088f7a4217742ed09025" - }, - "score_process": { - "repo": "https://github.com/eclipse-score/process_description.git", - "hash": "6c772cf05a493218a5ac6071361bf0b66c5427b2" - } - } - - - }, - "timestamp": "2026-02-10T21:12:42+00:00Z" -} diff --git a/integration/patches/baselibs/0001-RH-exception-header.patch b/patches/baselibs/0001-RH-exception-header.patch similarity index 100% rename from integration/patches/baselibs/0001-RH-exception-header.patch rename to patches/baselibs/0001-RH-exception-header.patch diff --git a/integration/patches/baselibs/0002-RH-algorithm-header.patch b/patches/baselibs/0002-RH-algorithm-header.patch similarity index 100% rename from integration/patches/baselibs/0002-RH-algorithm-header.patch rename to patches/baselibs/0002-RH-algorithm-header.patch diff --git a/integration/patches/baselibs/003-acl-fixes-for-aarch64.patch b/patches/baselibs/003-acl-fixes-for-aarch64.patch similarity index 100% rename from integration/patches/baselibs/003-acl-fixes-for-aarch64.patch rename to patches/baselibs/003-acl-fixes-for-aarch64.patch diff --git a/integration/feature_integration_tests/BUILD b/patches/baselibs/BUILD similarity index 100% rename from integration/feature_integration_tests/BUILD rename to patches/baselibs/BUILD diff --git a/integration/patches/baselibs/fix_hard_coded_amd64.patch b/patches/baselibs/fix_hard_coded_amd64.patch similarity index 100% rename from integration/patches/baselibs/fix_hard_coded_amd64.patch rename to patches/baselibs/fix_hard_coded_amd64.patch diff --git a/integration/runners/docker_x86_64/BUILD b/runners/docker_x86_64/BUILD similarity index 100% rename from integration/runners/docker_x86_64/BUILD rename to runners/docker_x86_64/BUILD diff --git a/integration/runners/docker_x86_64/scripts/BUILD b/runners/docker_x86_64/scripts/BUILD similarity index 100% rename from integration/runners/docker_x86_64/scripts/BUILD rename to runners/docker_x86_64/scripts/BUILD diff --git a/integration/runners/docker_x86_64/scripts/run_docker.sh b/runners/docker_x86_64/scripts/run_docker.sh similarity index 100% rename from integration/runners/docker_x86_64/scripts/run_docker.sh rename to runners/docker_x86_64/scripts/run_docker.sh diff --git a/integration/runners/qemu_x86_64/BUILD b/runners/qemu_x86_64/BUILD similarity index 100% rename from integration/runners/qemu_x86_64/BUILD rename to runners/qemu_x86_64/BUILD diff --git a/integration/runners/qemu_x86_64/scripts/BUILD b/runners/qemu_x86_64/scripts/BUILD similarity index 100% rename from integration/runners/qemu_x86_64/scripts/BUILD rename to runners/qemu_x86_64/scripts/BUILD diff --git a/integration/runners/qemu_x86_64/scripts/qnx_wireshark.sh b/runners/qemu_x86_64/scripts/qnx_wireshark.sh similarity index 100% rename from integration/runners/qemu_x86_64/scripts/qnx_wireshark.sh rename to runners/qemu_x86_64/scripts/qnx_wireshark.sh diff --git a/integration/runners/qemu_x86_64/scripts/run_qemu.sh b/runners/qemu_x86_64/scripts/run_qemu.sh similarity index 100% rename from integration/runners/qemu_x86_64/scripts/run_qemu.sh rename to runners/qemu_x86_64/scripts/run_qemu.sh diff --git a/integration/runners/qemu_x86_64/scripts/run_qemu_portforward.sh b/runners/qemu_x86_64/scripts/run_qemu_portforward.sh similarity index 100% rename from integration/runners/qemu_x86_64/scripts/run_qemu_portforward.sh rename to runners/qemu_x86_64/scripts/run_qemu_portforward.sh diff --git a/score_modules.MODULE.bazel b/score_modules.MODULE.bazel deleted file mode 100644 index 8c2d99b2e0..0000000000 --- a/score_modules.MODULE.bazel +++ /dev/null @@ -1,120 +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 -# ******************************************************************************* - -# Generated from known_good.json at 2026-02-10T21:12:42+00:00Z -# Do not edit manually - use scripts/known_good/update_module_from_known_good.py - -bazel_dep(name = "score_baselibs") -git_override( - module_name = "score_baselibs", - remote = "https://github.com/eclipse-score/baselibs.git", - commit = "ffd1c812213c66a436ed982632f6942528b58be8", -) - -bazel_dep(name = "score_baselibs_rust") -git_override( - module_name = "score_baselibs_rust", - remote = "https://github.com/eclipse-score/baselibs_rust.git", - commit = "0eba2934fa8b0e1a343ec6bf6f7ff00cec27d81c", -) - -bazel_dep(name = "score_communication") -git_override( - module_name = "score_communication", - remote = "https://github.com/eclipse-score/communication.git", - commit = "0c0ea032995eaa766f5bdcec031bc02ee10d4587", -) - -bazel_dep(name = "score_logging") -git_override( - module_name = "score_logging", - remote = "https://github.com/eclipse-score/logging.git", - commit = "2b3e56cf12cf582d0c0a235cad3d1d9b9fc1e494", -) - -bazel_dep(name = "score_persistency") -git_override( - module_name = "score_persistency", - remote = "https://github.com/eclipse-score/persistency.git", - commit = "9c1f0c1b1cd9b49621ecf4f9d541ded100fe2c08", -) - -bazel_dep(name = "score_orchestrator") -git_override( - module_name = "score_orchestrator", - remote = "https://github.com/eclipse-score/orchestrator.git", - commit = "fd6e21820a361b0c5ab69553f01bd68174d89ffd", -) - -bazel_dep(name = "score_kyron") -git_override( - module_name = "score_kyron", - remote = "https://github.com/eclipse-score/kyron.git", - commit = "d146401db4557d840850a7b5fc21b0f4fc8aac20", -) - -bazel_dep(name = "score_feo") -git_override( - module_name = "score_feo", - remote = "https://github.com/eclipse-score/feo.git", - commit = "4841281ab81aad114cfc86a19a69c029a274f28d", -) - -bazel_dep(name = "score_tooling") -git_override( - module_name = "score_tooling", - remote = "https://github.com/eclipse-score/tooling.git", - commit = "17671026150db4b4cc1b35e48af81b97e13685e5", -) - -bazel_dep(name = "score_platform") -git_override( - module_name = "score_platform", - remote = "https://github.com/eclipse-score/score.git", - commit = "22aed6f3bb7339fa50cc7e004de3c5af3d2eab6e", -) - -bazel_dep(name = "score_bazel_platforms") -git_override( - module_name = "score_bazel_platforms", - remote = "https://github.com/eclipse-score/bazel_platforms.git", - commit = "3ac1b805ba42b58a13f8960f947b7866c8bcf26c", -) - -bazel_dep(name = "score_test_scenarios") -git_override( - module_name = "score_test_scenarios", - remote = "https://github.com/eclipse-score/testing_tools.git", - commit = "6b5e85863e8fb5687251c19f5bb81e0a3afdf581", -) - -bazel_dep(name = "score_docs_as_code") -git_override( - module_name = "score_docs_as_code", - remote = "https://github.com/eclipse-score/docs-as-code.git", - commit = "ba006429268e6bd9b856088f7a4217742ed09025", -) - -bazel_dep(name = "score_process") -git_override( - module_name = "score_process", - remote = "https://github.com/eclipse-score/process_description.git", - commit = "6c772cf05a493218a5ac6071361bf0b66c5427b2", -) - -bazel_dep(name = "score_lifecycle_health") -git_override( - module_name = "score_lifecycle_health", - remote = "https://github.com/eclipse-score/lifecycle.git", - commit = "297808cf7c0013e08a0982133a0add1d9b1a9d9e", -) diff --git a/integration/score_starter b/score_starter similarity index 100% rename from integration/score_starter rename to score_starter diff --git a/score_toolchains.MODULE.bazel b/score_toolchains.MODULE.bazel deleted file mode 100644 index f3a27898f4..0000000000 --- a/score_toolchains.MODULE.bazel +++ /dev/null @@ -1,60 +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 -# ******************************************************************************* - - -bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.0") -gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True) - -# ******************************************************************************* -# Setting default GCC (CPU:x86_64|OS:Linux|V:12.2.0|ES:posix) -# ******************************************************************************* -gcc.toolchain( - name = "score_gcc_toolchain", - target_cpu = "x86_64", - target_os = "linux", - version = "12.2.0", - use_default_package = True, -) -gcc.toolchain( - name = "score_gcc_aarch64_toolchain", - target_cpu = "aarch64", - target_os = "linux", - use_default_package = True, - version = "12.2.0", -) -gcc.toolchain( - name = "score_qcc_x86_64_toolchain", - sdp_version = "8.0.0", - target_cpu = "x86_64", - target_os = "qnx", - use_default_package = True, - version = "12.2.0", -) -gcc.toolchain( - name = "score_qcc_aarch64_toolchain", - sdp_version = "8.0.0", - target_cpu = "aarch64", - target_os = "qnx", - use_default_package = True, - version = "12.2.0", -) -use_repo( - gcc, - "score_gcc_aarch64_toolchain", - "score_gcc_x86_64_toolchain", - "score_qcc_aarch64_toolchain", - "score_qcc_x86_64_toolchain", -) - - -bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True) diff --git a/integration/showcases/BUILD b/showcases/BUILD similarity index 100% rename from integration/showcases/BUILD rename to showcases/BUILD diff --git a/integration/showcases/cli/BUILD b/showcases/cli/BUILD similarity index 100% rename from integration/showcases/cli/BUILD rename to showcases/cli/BUILD diff --git a/integration/showcases/cli/README.md b/showcases/cli/README.md similarity index 100% rename from integration/showcases/cli/README.md rename to showcases/cli/README.md diff --git a/integration/showcases/cli/main.rs b/showcases/cli/main.rs similarity index 100% rename from integration/showcases/cli/main.rs rename to showcases/cli/main.rs diff --git a/integration/showcases/kyron/BUILD b/showcases/kyron/BUILD similarity index 100% rename from integration/showcases/kyron/BUILD rename to showcases/kyron/BUILD diff --git a/integration/showcases/kyron/kyron.score.json b/showcases/kyron/kyron.score.json similarity index 100% rename from integration/showcases/kyron/kyron.score.json rename to showcases/kyron/kyron.score.json diff --git a/integration/showcases/kyron/main.rs b/showcases/kyron/main.rs similarity index 100% rename from integration/showcases/kyron/main.rs rename to showcases/kyron/main.rs diff --git a/integration/showcases/orchestration_persistency/BUILD b/showcases/orchestration_persistency/BUILD similarity index 100% rename from integration/showcases/orchestration_persistency/BUILD rename to showcases/orchestration_persistency/BUILD diff --git a/integration/showcases/orchestration_persistency/main.rs b/showcases/orchestration_persistency/main.rs similarity index 100% rename from integration/showcases/orchestration_persistency/main.rs rename to showcases/orchestration_persistency/main.rs diff --git a/integration/showcases/orchestration_persistency/orch_per.score.json b/showcases/orchestration_persistency/orch_per.score.json similarity index 100% rename from integration/showcases/orchestration_persistency/orch_per.score.json rename to showcases/orchestration_persistency/orch_per.score.json diff --git a/integration/showcases/simple_lifecycle/BUILD b/showcases/simple_lifecycle/BUILD similarity index 100% rename from integration/showcases/simple_lifecycle/BUILD rename to showcases/simple_lifecycle/BUILD diff --git a/integration/showcases/simple_lifecycle/configs/BUILD b/showcases/simple_lifecycle/configs/BUILD similarity index 100% rename from integration/showcases/simple_lifecycle/configs/BUILD rename to showcases/simple_lifecycle/configs/BUILD diff --git a/integration/showcases/simple_lifecycle/configs/cpp_supervised_app_demo.json b/showcases/simple_lifecycle/configs/cpp_supervised_app_demo.json similarity index 100% rename from integration/showcases/simple_lifecycle/configs/cpp_supervised_app_demo.json rename to showcases/simple_lifecycle/configs/cpp_supervised_app_demo.json diff --git a/integration/showcases/simple_lifecycle/configs/hm_demo.json b/showcases/simple_lifecycle/configs/hm_demo.json similarity index 100% rename from integration/showcases/simple_lifecycle/configs/hm_demo.json rename to showcases/simple_lifecycle/configs/hm_demo.json diff --git a/integration/showcases/simple_lifecycle/configs/lm_demo.json b/showcases/simple_lifecycle/configs/lm_demo.json similarity index 100% rename from integration/showcases/simple_lifecycle/configs/lm_demo.json rename to showcases/simple_lifecycle/configs/lm_demo.json diff --git a/integration/showcases/simple_lifecycle/configs/rust_supervised_app_demo.json b/showcases/simple_lifecycle/configs/rust_supervised_app_demo.json similarity index 100% rename from integration/showcases/simple_lifecycle/configs/rust_supervised_app_demo.json rename to showcases/simple_lifecycle/configs/rust_supervised_app_demo.json diff --git a/integration/showcases/simple_lifecycle/lifecycle_signal.sh b/showcases/simple_lifecycle/lifecycle_signal.sh similarity index 100% rename from integration/showcases/simple_lifecycle/lifecycle_signal.sh rename to showcases/simple_lifecycle/lifecycle_signal.sh diff --git a/integration/showcases/simple_lifecycle/simple_lifecycle.score.json b/showcases/simple_lifecycle/simple_lifecycle.score.json similarity index 100% rename from integration/showcases/simple_lifecycle/simple_lifecycle.score.json rename to showcases/simple_lifecycle/simple_lifecycle.score.json diff --git a/integration/showcases/standalone/BUILD b/showcases/standalone/BUILD similarity index 100% rename from integration/showcases/standalone/BUILD rename to showcases/standalone/BUILD From 2479ea3a703f274a11c031a6f1559103a266ccab Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Fri, 13 Feb 2026 16:06:11 +0100 Subject: [PATCH 08/10] Update all common files --- .bazelignore | 4 +- .bazelrc | 128 +++++++----------- .bazelversion | 2 +- .github/workflows/build_and_test_autosd.yml | 16 +-- .github/workflows/build_and_test_ebclfsa.yml | 5 - ...nit_tests.yml => build_and_test_linux.yml} | 8 +- .github/workflows/build_and_test_qnx.yml | 6 +- .github/workflows/known_good_correct.yml | 2 +- .github/workflows/test_integration.yml | 1 + .gitignore | 2 +- BUILD | 27 ++++ MODULE.bazel | 2 +- known_good_next.json => known_good.json | 9 -- scripts/known_good/models/module.py | 7 + scripts/known_good/update_module_latest.py | 4 + scripts/quality_runners.py | 2 +- 16 files changed, 107 insertions(+), 118 deletions(-) rename .github/workflows/{unit_tests.yml => build_and_test_linux.yml} (94%) rename known_good_next.json => known_good.json (92%) diff --git a/.bazelignore b/.bazelignore index ee0205ffc2..c795b054e5 100644 --- a/.bazelignore +++ b/.bazelignore @@ -1,3 +1 @@ -autosd -ebclfsa -qnx_qemu +build \ No newline at end of file diff --git a/.bazelrc b/.bazelrc index ddd24a4ed9..8991afa26d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,81 +1,51 @@ -# ******************************************************************************* -# 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 -# ******************************************************************************* - common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ common --registry=https://bcr.bazel.build - - -# Flags needed by score_baselibs and communication modules. -# Do not add more! -common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False -common --@score_baselibs//score/json:base_library=nlohmann -common --@score_communication//score/mw/com/flags:tracing_library=stub -common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False -common --@score_logging//score/datarouter/build_configuration_flags:persistent_logging=False -common --@score_logging//score/datarouter/build_configuration_flags:persistent_config_feature_enabled=False -common --@score_logging//score/datarouter/build_configuration_flags:enable_nonverbose_dlt=False -common --@score_logging//score/datarouter/build_configuration_flags:enable_dynamic_configuration_in_datarouter=False -common --@score_logging//score/datarouter/build_configuration_flags:use_local_vlan=True -common --@score_logging//score/mw/log/flags:KRemote_Logging=False - -# stop legacy behavior of creating __init__.py files -build --incompatible_default_to_explicit_init_py -build --incompatible_strict_action_env -build --experimental_retain_test_configuration_across_testonly #https://github.com/bazelbuild/bazel/issues/6842 - -test --test_tag_filters=-manual -test --test_output=errors - -build:shared --sandbox_writable_path=/var/tmp -build:shared --host_platform=@score_bazel_platforms//:x86_64-linux - -build:x86_64-linux --config=shared -build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix -build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu -build:x86_64-linux --features=-treat_warnings_as_errors # due to baselibs deprecations - -# this is deprecated, use build:x86_64-linux instead -build:_bl_common --host_platform=@score_bazel_platforms//:x86_64-linux - -# This config is for internal module usage ONLY. -build:bl-x86_64-qnx --config=_bl_common -build:bl-x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx -build:bl-x86_64-qnx --extra_toolchains=@toolchains_qnx_qcc//:qcc_x86_64 - -# This config is for internal module usage ONLY. -build:bl-x86_64-linux-autosd --config=_bl_common -build:bl-x86_64-linux-autosd --define=score_sw_platform=autosd -build:bl-x86_64-linux-autosd --platforms=@score_bazel_platforms//:x86_64-linux -build:bl-x86_64-linux-autosd --extra_toolchains=@autosd_10_gcc_repo//:gcc_toolchain_linux_x86_64 -build:bl-x86_64-linux-autosd --force_pic - -# This config is for internal module usage ONLY. -test:bl-x86_64-linux --config=_bl_common -test:bl-x86_64-linux --build_tests_only -test:bl-x86_64-linux --test_tag_filters=-manual -test:bl-x86_64-linux --test_output=errors - - -# config from communication .bazelrc file -# unshare /dev/shm and /tmp -test --sandbox_tmpfs_path=/dev/shm -test --sandbox_tmpfs_path=/tmp - -# Java -build --java_language_version=17 -build --tool_java_language_version=17 -build --java_runtime_version=remotejdk_17 -build --tool_java_runtime_version=remotejdk_17 - -# user specific overrides (like proxy settings) -try-import %workspace%/user.bazelrc +common --credential_helper=*.qnx.com=%workspace%/scripts/qnx_credential_helper.py +common --credential_helper_timeout="60s" + +build:_common --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False +build:_common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False +build:_common --@score_baselibs//score/json:base_library=nlohmann +build:_common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False +build:_common --@score_communication//score/mw/com/flags:tracing_library=stub +build:_common --cxxopt=-Wno-error=mismatched-new-delete +build:_common --host_platform=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix +build:_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu +build:_common --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix + +build:qnx-x86_64 --config=_common +build:qnx-x86_64 --noexperimental_merged_skyframe_analysis_execution +build:qnx-x86_64 --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 +build:qnx-x86_64 --incompatible_enable_cc_toolchain_resolution +build:qnx-x86_64 --incompatible_strict_action_env +build:qnx-x86_64 --sandbox_writable_path=/var/tmp +build:qnx-x86_64 --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix +build:qnx-x86_64 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix +build:qnx-x86_64 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64 +build:qnx-x86_64 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 + +build:itf-qnx-x86_64 --config=qnx-x86_64 +build:itf-qnx-x86_64 --run_under=@score_itf//scripts:run_under_qemu +build:itf-qnx-x86_64 --test_arg="--qemu" +build:itf-qnx-x86_64 --test_arg="--os=qnx" + + +build:linux-x86_64 --config=_common +build:linux-x86_64 --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix +build:linux-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix + +build:eb-aarch64 --config=_common +build:eb-aarch64 --extra_toolchains=@gcc_toolchain//:aarch64_gcc_13 +build:eb-aarch64 --platforms=@score_toolchains_gcc//platforms:aarch64-linux +build:eb-aarch64 --spawn_strategy=local + + +build:autosd-x86_64 --config=_common +build:autosd-x86_64 --platforms=@score_bazel_platforms//:x86_64-linux +build:autosd-x86_64 --force_pic +build:autosd-x86_64 --extra_toolchains=@autosd_10_gcc_repo//:gcc_toolchain_linux_x86_64 +build:autosd-x86_64 --extra_toolchains=@rules_rpm//toolchains:linux_x86_64 + + + +test:unit-tests --config=linux-x86_64 \ No newline at end of file diff --git a/.bazelversion b/.bazelversion index 56b6be4ebb..e7fdef7e2e 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -8.3.1 +8.4.2 diff --git a/.github/workflows/build_and_test_autosd.yml b/.github/workflows/build_and_test_autosd.yml index 6ad6a755d7..48c71a29cb 100644 --- a/.github/workflows/build_and_test_autosd.yml +++ b/.github/workflows/build_and_test_autosd.yml @@ -16,12 +16,9 @@ name: AutoSD - Build & Test on: pull_request: types: [opened, reopened, synchronize] - paths: - - 'integration/**' + merge_group: types: [checks_requested] - paths: - - 'integration/**' jobs: build: @@ -43,7 +40,7 @@ jobs: - name: Build Showcases RPMs run: | bazel build --config autosd-x86_64 //images/autosd_x86_64:score-reference-integration - working-directory: ./integration/images/autosd_x86_64 + working-directory: ./images/autosd_x86_64 - name: Copy RPMs run: | @@ -52,13 +49,12 @@ jobs: cp bazel-bin/images/autosd_x86_64/score-reference-integration-0.6.0-1.x86_64.rpm ./images/autosd_x86_64/build/rpms createrepo_c ./images/autosd_x86_64/build/rpms/ ls -l ./images/autosd_x86_64/build/rpms/ - working-directory: ./integration - name: Install AIB Tools run: | curl -o auto-image-builder.sh "https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/raw/main/auto-image-builder.sh?ref_type=heads" chmod +x auto-image-builder.sh - working-directory: ./integration/images/autosd_x86_64/build + working-directory: ./images/autosd_x86_64/build - name: Build AutoSD QEMU (x86_64) run: | @@ -78,7 +74,7 @@ jobs: sudo -E ./auto-image-builder.sh to-disk-image localhost/score:latest _build/disk.qcow2 sudo chown $(id -u):$(id -u) _build/disk.qcow2 - working-directory: ./integration/images/autosd_x86_64/build + working-directory: ./images/autosd_x86_64/build - name: Enable KVM group perms run: | @@ -95,7 +91,7 @@ jobs: ./scripts/run_qemu sshcmd 'cat /etc/os-release' - working-directory: ./integration/images/autosd_x86_64/build + working-directory: ./images/autosd_x86_64/build env: SSH_PASSWORD: password @@ -103,4 +99,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: autosd10-score-reference_integration-x86_64.qcow2 - path: integration/images/autosd_x86_64/build/_build/disk.qcow2 + path: images/autosd_x86_64/build/_build/disk.qcow2 diff --git a/.github/workflows/build_and_test_ebclfsa.yml b/.github/workflows/build_and_test_ebclfsa.yml index 1d644ab69d..afa3d003e8 100644 --- a/.github/workflows/build_and_test_ebclfsa.yml +++ b/.github/workflows/build_and_test_ebclfsa.yml @@ -16,12 +16,8 @@ name: EB Corbos Linux for Safety Applications - Build & Test on: pull_request: types: [opened, reopened, synchronize] - paths: - - 'integration/**' merge_group: types: [checks_requested] - paths: - - 'integration/**' jobs: build: @@ -37,7 +33,6 @@ jobs: - name: Build for EB corbos Linux for Safety Applications and run tests run: | bazel build --config=eb-aarch64 //images/ebclfsa_aarch64/scrample_integration:run - working-directory: ./integration - name: Upload test logs uses: actions/upload-artifact@v5 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/build_and_test_linux.yml similarity index 94% rename from .github/workflows/unit_tests.yml rename to .github/workflows/build_and_test_linux.yml index 84ac61a464..88f0a9b5b4 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/build_and_test_linux.yml @@ -57,9 +57,13 @@ jobs: disk-cache: ${{ github.workflow }} repository-cache: true - - name: Bazel build targets + - name: Build image run: | - cd integration && python3 ../scripts/quality_runners.py --unit-tests + bazel build --config=linux-x86_64 //images/linux_x86_64:image + + - name: Execute Unit Tests + run: | + python3 ./scripts/quality_runners.py --unit-tests - name: Publish build summary if: always() diff --git a/.github/workflows/build_and_test_qnx.yml b/.github/workflows/build_and_test_qnx.yml index a1509c5120..2df5464d78 100644 --- a/.github/workflows/build_and_test_qnx.yml +++ b/.github/workflows/build_and_test_qnx.yml @@ -15,12 +15,9 @@ name: QNX8 - Build & Test on: pull_request_target: types: [opened, reopened, synchronize] - paths: - - 'integration/**' + merge_group: types: [checks_requested] - paths: - - 'integration/**' jobs: qnx-build-x86_64: @@ -62,7 +59,6 @@ jobs: SCORE_QNX_PASSWORD: ${{ secrets.SCORE_QNX_PASSWORD }} run: | bazel build --config qnx-x86_64 //images/qnx_x86_64:image - working-directory: ./integration - name: Cleanup QNX license if: always() diff --git a/.github/workflows/known_good_correct.yml b/.github/workflows/known_good_correct.yml index 3f9ca5a1a6..83c7e88cf4 100644 --- a/.github/workflows/known_good_correct.yml +++ b/.github/workflows/known_good_correct.yml @@ -32,7 +32,7 @@ jobs: - name: Check run: | ls -la - scripts/known_good/update_module_from_known_good.py --known known_good_next.json --output-dir integration/bazel_common + scripts/known_good/update_module_from_known_good.py --known known_good.json --output-dir integration/bazel_common if git diff --quiet; then echo "No changes" else diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index f1e67e95ab..96850ed2d2 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -23,6 +23,7 @@ on: # - cron: '30 2 * * *' # Every night at 02:30 UTC on main branch jobs: integration_test: + if: false # Temporarily disabled until we get things sorted out uses: ./.github/workflows/reusable_smoke-test.yml secrets: inherit with: diff --git a/.gitignore b/.gitignore index 379315e0cc..b317e3b98e 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,4 @@ __pycache__/ /score_*/ /.gita/ /.gita-workspace.csv -integration/build +build diff --git a/BUILD b/BUILD index e69de29bb2..f8273c8126 100644 --- a/BUILD +++ b/BUILD @@ -0,0 +1,27 @@ +# ******************************************************************************* +# 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 +# ******************************************************************************* + +load("@score_docs_as_code//:docs.bzl", "docs") + +docs( + data = [ + "@score_platform//:needs_json", + #"@score_persistency//:needs_json", # cannot be included, as it does not contain any needs? + #"@score_orchestrator//:needs_json", # some issue about score_toolchains_qnx? + #"@score_communication//:needs_json", # no docs yet? + # "@score_feo//:needs_json", + "@score_docs_as_code//:needs_json", + "@score_process//:needs_json", + ], + source_dir = "docs", +) diff --git a/MODULE.bazel b/MODULE.bazel index d15d9406c0..02649e7c24 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* module( - name = "score_ref_int_qnx_x86_64", + name = "score_ref_int", version = "0.0.1", compatibility_level = 0, ) diff --git a/known_good_next.json b/known_good.json similarity index 92% rename from known_good_next.json rename to known_good.json index a64c6342e3..19133e2cb8 100644 --- a/known_good_next.json +++ b/known_good.json @@ -69,15 +69,6 @@ "score_scrample": { "repo": "https://github.com/eclipse-score/scrample.git", "version": "0.1.0" - }, - "score_feo": { - "repo": "https://github.com/eclipse-score/feo.git", - "hash": "4841281ab81aad114cfc86a19a69c029a274f28d", - "metadata": { - "code_root_path": "//...", - "exclude_test_targets": [ - "//:format.check_Rust_with_rustfmt" - ] } } }, "tooling": { diff --git a/scripts/known_good/models/module.py b/scripts/known_good/models/module.py index bef496695a..2180b9fbc8 100644 --- a/scripts/known_good/models/module.py +++ b/scripts/known_good/models/module.py @@ -60,6 +60,7 @@ class Module: bazel_patches: list[str] | None = None metadata: Metadata = field(default_factory=Metadata) branch: str = "main" + pin_version: bool = False @classmethod def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: @@ -80,6 +81,8 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: } If not present, uses default Metadata values. - branch (str, optional): Git branch name (default: main) + - pin_version (bool, optional): If true, module hash is not updated + to latest HEAD by update scripts (default: false) Returns: Module instance @@ -107,6 +110,7 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: metadata = Metadata() branch = module_data.get("branch", "main") + pin_version = module_data.get("pin_version", False) return cls( name=name, @@ -116,6 +120,7 @@ def from_dict(cls, name: str, module_data: Dict[str, Any]) -> Module: bazel_patches=bazel_patches if bazel_patches else None, metadata=metadata, branch=branch, + pin_version=pin_version, ) @classmethod @@ -177,4 +182,6 @@ def to_dict(self) -> Dict[str, Any]: result["bazel_patches"] = self.bazel_patches if self.branch and self.branch != "main": result["branch"] = self.branch + if self.pin_version: + result["pin_version"] = True return result diff --git a/scripts/known_good/update_module_latest.py b/scripts/known_good/update_module_latest.py index 44006afe60..d5184bd2f0 100755 --- a/scripts/known_good/update_module_latest.py +++ b/scripts/known_good/update_module_latest.py @@ -132,6 +132,10 @@ def main(argv: list[str]) -> int: print("INFO: --no-gh specified; ignoring installed 'gh' CLI", file=sys.stderr) for mod in known_good.modules.values(): + if mod.pin_version: + print(f"{mod.name}: pinned, skipping") + continue + try: branch = mod.branch if mod.branch else args.branch if use_gh: diff --git a/scripts/quality_runners.py b/scripts/quality_runners.py index 15a760e0fa..7e2de3b146 100644 --- a/scripts/quality_runners.py +++ b/scripts/quality_runners.py @@ -185,7 +185,7 @@ def parse_arguments() -> argparse.Namespace: parser.add_argument( "--known-good-path", type=Path, - default=Path(__file__).parent / "../known_good_next.json", + default=Path(__file__).parent / "known_good.json", help="Path to the known good JSON file", ) parser.add_argument( From fd1265d61fae531266a0461d5bfa20dead78309a Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Fri, 13 Feb 2026 16:32:23 +0100 Subject: [PATCH 09/10] Doc cleanup --- .bazelrc | 12 +- .github/workflows/build_and_test_linux.yml | 4 +- README.md | 218 ++++++++++++++++++++- docs/index.rst | 2 +- scripts/quality_runners.py | 2 +- 5 files changed, 231 insertions(+), 7 deletions(-) diff --git a/.bazelrc b/.bazelrc index 8991afa26d..f7ebbe105d 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,6 +3,12 @@ common --registry=https://bcr.bazel.build common --credential_helper=*.qnx.com=%workspace%/scripts/qnx_credential_helper.py common --credential_helper_timeout="60s" +# Java +build --java_language_version=17 +build --tool_java_language_version=17 +build --java_runtime_version=remotejdk_17 +build --tool_java_runtime_version=remotejdk_17 + build:_common --@score_baselibs//score/mw/log/detail/flags:KUse_Stub_Implementation_Only=False build:_common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False build:_common --@score_baselibs//score/json:base_library=nlohmann @@ -48,4 +54,8 @@ build:autosd-x86_64 --extra_toolchains=@rules_rpm//toolchains:linux_x86_64 -test:unit-tests --config=linux-x86_64 \ No newline at end of file +test:unit-tests --config=linux-x86_64 + + +# user specific overrides (like proxy settings) +try-import %workspace%/user.bazelrc \ No newline at end of file diff --git a/.github/workflows/build_and_test_linux.yml b/.github/workflows/build_and_test_linux.yml index 88f0a9b5b4..0558286c63 100644 --- a/.github/workflows/build_and_test_linux.yml +++ b/.github/workflows/build_and_test_linux.yml @@ -11,7 +11,7 @@ # SPDX-License-Identifier: Apache-2.0 # ******************************************************************************* -name: Execute Unit Tests +name: Quality check on x86_64 Linux on: workflow_dispatch: pull_request: @@ -21,7 +21,7 @@ on: branches: - main jobs: - integration_test: + quality_checks: runs-on: ubuntu-latest permissions: contents: write # required to upload release assets diff --git a/README.md b/README.md index d9cd398267..c58358601f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,219 @@ -# Integration directory +# Score Reference Integration + +This workspace integrates multiple Eclipse Score modules (baselibs, communication, persistency, orchestrator, feo, etc.) to validate cross-repository builds and detect integration issues early in the development cycle. + +## Overview + +The reference integration workspace serves as a single Bazel build environment to: +- Validate cross-module dependency graphs +- Detect label and repository boundary issues +- Test toolchain and platform support (Linux, QNX, LLVM/GCC) +- Prepare for release validation workflows + ## Get started -Simply run `./score_starter` and select which integration You want to run. Once running, You will be guided by our welcome cli to run selected examples. \ No newline at end of file +Simply run `./score_starter` and select which integration You want to run. Once running, You will be guided by our welcome cli to run selected examples. + +## Structure of repo + +Intention for each folder is described below + +### bazel_common +Used to keep a common bazel functionalities for `images` like: +- toolchain setups +- common tooling deps +- common S-CORE modules deps +- common `.bzl` extensions needed to streamline images + + +### showcases +Used to keep `S-CORE` wide **showcases** implementation to showcase S-CORE in certain deployments (images). Contains: +- proxy target bundling all `standalone` examples from all `S-CORE` repos to deploy then as single bazel target into image +- implementation of certain **showcases** that shall be deployed into images + +#### cli + +Contains a CLI tool to be used on runner that is showcasing the S-CORE functionality. It will provide superior user experience and will guide user to run examples. +How to use it in Your image, look [here](./showcases/cli/README.md) + +### images +Used to keep concrete `images` for given target platform as bazel modules. Each platform shall have it's own folder with name `{platform}_{arch}` ie. `qnx_aarch64`. + +This `images` shall: + - deploy all `showcases` into image so they can be run inside + - other specific code for given `image` + +### runners +Used to keep thin logic ro reuse `runners` between images, like docker runner etc. + +## Docs + +To generate a full documentation of all integrated modules, run: +```bash +bazel run //:docs_combo_experimental +``` +## Operating system integrations + +> [!NOTE] +> Please refer to the README documents in the respective sub-directories for details about the specific integration. + +* [QNX](./images/qnx_x86_64//README.md) +* [Red Hat AutoSD](./images/autosd_x86_64/build/README.md) +* [Elektrobit corbos Linux for Safety Applications](./images/ebclfsa_aarch64/README.md) +* [Linux x86_64]() + +## Workspace support + +You can obtain a complete S-CORE workspace, i.e. a git checkout of all modules from `known_good.json`, on the specific branches / commits, integrated into one Bazel build. +This helps with cross-module development, debugging, and generally "trying out things". + +> [!NOTE] +> The startup of the [S-CORE devcontainer](https://github.com/eclipse-score/devcontainer) [integrated in this repository](.devcontainer/) already installs supported workspace managers and generates the required metadata. +> You can do this manually as well, of course (e.g. if you do not use the devcontainer). +> Take a look at `.devcontainer/prepare_workspace.sh`, which contains the setup script. + +> [!NOTE] +> Not all Bazel targets are supported yet. +> Running `./scripts/integration_test.sh` will work, though. +> Take a look at the [Known Issues](#known-issues-๏ธ) below to see which Bazel targets are available and working. + +The supported workspace managers are: + +| Name | Description | +|------|-------------| +| [Gita](https://github.com/nosarthur/gita) | "a command-line tool to manage multiple git repos" | + +A description of how to use these workspace managers, together with their advantages and drawbacks, is beyond the scope of this document. +In case of doubt, choose the first. + +### Initialization of the workspace + +> [!WARNING] +> This will change the file `score_modules.MODULE.bazel`. +> Do **not** commit these changes! + +1. Switch to local path overrides, using the VSCode Task (`Terminal`->`Run Task...`) "Switch Bazel modules to `local_path_overrides`". + Note that you can switch back to `git_overrides` (the default) using the task "Switch Bazel modules to `git_overrides`" + + **Command line:** + ```bash + python3 scripts/known_good/update_module_from_known_good.py --override-type local_path + ``` + +2. Update workspace metadata from known good, using the VSCode Task "Update workspace metadata from known good". + This will generate the `.gita-workspace.csv` file based on `known_good.json`. + + **Command line:** + ```bash + python3 scripts/known_good/known_good_to_workspace_metadata.py + ``` + +3. Run VSCode Task "<Name>: Generate workspace", e.g. "Gita: Generate workspace". + This will clone all modules using the chosen workspace manager. + The modules will be in sub-directories starting with `score_`. + Note that the usage of different workspace managers is mutually exclusive. + + **Command line:** + ```bash + gita clone --preserve-path --from-file .gita-workspace.csv + ``` + +When you now run Bazel, it will use the local working copies of all modules and not download them from git remotes. +You can make local changes to each module, which will be directly reflected in the next Bazel run. + +## Known Issues โš ๏ธ + +### Orchestrator +**Issue:** Direct toolchain loading at `BUILD:14` +``` +load("@score_toolchains_qnx//rules/fs:ifs.bzl", "qnx_ifs") +``` +**Resolution needed:** Refactor to use proper toolchain resolution instead of direct load statements. + +**Issue:** clang needs to be installed +``` +sudo apt install clang +``` +**Resolution needed:** why is this happening with -extra_toolchains=@gcc_toolchain//:host_gcc_12 ? + +### Communication +**Module:** `score/mw/com/requirements` + +**Issues when building from external repository:** +1. **Label inconsistency:** Some `BUILD` files use `@//third_party` instead of `//third_party` (repository-qualified vs. local label). Should standardize on local labels within the module. +2. **Outdated path reference:** `runtime_test.cpp:get_path` checks for `safe_posix_platform` (likely obsolete module name) instead of `external/score_communication+/`. + +### Persistency +**Test failures in `src/cpp/tests`:** +1. **Dependency misconfiguration:** `google_benchmark` should not be a dev-only dependency if required by tests. Consider separating benchmark targets. +2. **Compiler-specific issue in `test_kvs.cpp`:** Contains GCC-specific self-move handling that is incorrect and fails with GCC (only builds with LLVM). Needs portable fix or removal of undefined behavior. + +## Build Blockers ๐Ÿšง + +The following builds are currently failing: + +### FEO (Full Build) +```bash +bazel build @feo//... --verbose_failures +``` + +### Persistency (Full Build) +```bash +bazel build --config x86_64-linux @score_persistency//src/... --verbose_failures +``` + +## System Dependencies + +### Required Packages for FEO +Install the following system packages before building FEO: +```bash +sudo apt-get update +sudo apt-get install -y protobuf-compiler libclang-dev +``` + +## Pending Tasks ๐Ÿงช + +- [ ] Add test targets once cross-repository visibility constraints are clarified +- [ ] Normalize third-party label usage across all `BUILD` files +- [ ] Resolve FEO build failures +- [ ] Fix Persistency full build +- [ ] Address compiler-specific issues in test suites + +## Proxy & External Dependencies ๐ŸŒ + +### Current Issue + +The `starpls.bzl` file ([source](https://github.com/eclipse-score/tooling/blob/main/starpls/starpls.bzl)) uses `curl` directly for downloading dependencies, which: +- Bypasses Bazel's managed fetch lifecycle and dependency tracking +- Breaks reproducibility and remote caching expectations +- May fail in corporate proxy-restricted environments + +### Workaround + +Use a `local_path_override` and configure proxy environment variables before building: + +```bash +export http_proxy=http://127.0.0.1:3128 +export https_proxy=http://127.0.0.1:3128 +export HTTP_PROXY=http://127.0.0.1:3128 +export HTTPS_PROXY=http://127.0.0.1:3128 +``` + +Add this to your `MODULE.bazel`: +```python +local_path_override(module_name = "score_tooling", path = "../tooling") +``` + +### Suggested Improvements +- Replace raw `curl` calls with Bazel `http_archive` or `repository_ctx.download` for reproducibility. +- Parameterize proxy usage via environment or Bazel config flags. + +## IDE support + +### Rust + +Use `scripts/generate_rust_analyzer_support.sh` to generate rust_analyzer settings that will let VS Code work. + +## ๐Ÿ—‚ Notes +Keep this file updated as integration issues are resolved. Prefer converting ad-hoc shell steps into Bazel rules or documented scripts under `scripts/` for repeatability. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index f1d667dc43..2365a45c3f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -34,7 +34,7 @@ Verification Reports Summaries place_holder/persistency place_holder/orchestrator place_holder/communication - FEO <_collections/score_feo/docs/index> + .. FEO <_collections/score_feo/docs/index> .. toctree:: :maxdepth: 1 diff --git a/scripts/quality_runners.py b/scripts/quality_runners.py index 7e2de3b146..4c4d5e221f 100644 --- a/scripts/quality_runners.py +++ b/scripts/quality_runners.py @@ -185,7 +185,7 @@ def parse_arguments() -> argparse.Namespace: parser.add_argument( "--known-good-path", type=Path, - default=Path(__file__).parent / "known_good.json", + default="known_good.json", help="Path to the known good JSON file", ) parser.add_argument( From 298f9c7cd7cb8f638a570d84326070874f5a5666 Mon Sep 17 00:00:00 2001 From: Piotr Korkus Date: Fri, 13 Feb 2026 22:27:57 +0100 Subject: [PATCH 10/10] add cpp coverage calculation --- .bazelrc | 3 + .github/workflows/build_and_test_linux.yml | 10 ++ .gitignore | 1 + docs/verification/coverage_summary.md | 6 + docs/verification/unit_test_summary.md | 2 +- docs/verification/verification.rst | 1 + known_good.json | 11 +- scripts/quality_runners.py | 171 +++++++++++++++++---- 8 files changed, 174 insertions(+), 31 deletions(-) create mode 100644 docs/verification/coverage_summary.md diff --git a/.bazelrc b/.bazelrc index f7ebbe105d..5c30faacb1 100644 --- a/.bazelrc +++ b/.bazelrc @@ -56,6 +56,9 @@ build:autosd-x86_64 --extra_toolchains=@rules_rpm//toolchains:linux_x86_64 test:unit-tests --config=linux-x86_64 +# Coverage configuration for C++ +coverage --features=coverage +coverage --combined_report=lcov # user specific overrides (like proxy settings) try-import %workspace%/user.bazelrc \ No newline at end of file diff --git a/.github/workflows/build_and_test_linux.yml b/.github/workflows/build_and_test_linux.yml index 0558286c63..1a5460a74e 100644 --- a/.github/workflows/build_and_test_linux.yml +++ b/.github/workflows/build_and_test_linux.yml @@ -65,6 +65,10 @@ jobs: run: | python3 ./scripts/quality_runners.py --unit-tests + - name: Execute Coverage Analysis + run: | + python3 ./scripts/quality_runners.py --coverage + - name: Publish build summary if: always() run: | @@ -73,6 +77,12 @@ jobs: else echo "No build summary file found (docs/verification/unit_test_summary.md)" >> "$GITHUB_STEP_SUMMARY" fi + echo "" >> "$GITHUB_STEP_SUMMARY" # Add a newline for better formatting + if [ -f docs/verification/coverage_summary.md ]; then + cat docs/verification/coverage_summary.md >> "$GITHUB_STEP_SUMMARY" + else + echo "No coverage summary file found (docs/verification/coverage_summary.md)" >> "$GITHUB_STEP_SUMMARY" + fi - name: Upload logs artifact if: always() diff --git a/.gitignore b/.gitignore index b317e3b98e..a135a99038 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ __pycache__/ /.gita/ /.gita-workspace.csv build +artifacts diff --git a/docs/verification/coverage_summary.md b/docs/verification/coverage_summary.md new file mode 100644 index 0000000000..3c03acd6b7 --- /dev/null +++ b/docs/verification/coverage_summary.md @@ -0,0 +1,6 @@ +# Coverage Analysis Summary + +| module | lines | functions | branches | +| --- | --- | --- | --- | +| score_baselibs | 93.0% | 83.1% | 63.5% | +| score_persistency | 95.3% | 96.5% | 63.4% | diff --git a/docs/verification/unit_test_summary.md b/docs/verification/unit_test_summary.md index 1a152d6919..f23d5752ad 100644 --- a/docs/verification/unit_test_summary.md +++ b/docs/verification/unit_test_summary.md @@ -1,4 +1,4 @@ -# Unit Test Summary +# Unit Test Execution Summary | module | passed | failed | skipped | total | | --- | --- | --- | --- | --- | diff --git a/docs/verification/verification.rst b/docs/verification/verification.rst index 06b316f195..7005f8a90a 100644 --- a/docs/verification/verification.rst +++ b/docs/verification/verification.rst @@ -19,3 +19,4 @@ Verification Reports Summaries :titlesonly: Unit Tests Summary + Coverage Analysis Summary diff --git a/known_good.json b/known_good.json index 19133e2cb8..6cf30a4709 100644 --- a/known_good.json +++ b/known_good.json @@ -42,21 +42,26 @@ "repo": "https://github.com/eclipse-score/persistency.git", "hash": "0037034bf853e5f955f028fab54ed319fb0441c3", "metadata": { - "code_root_path": "//src/rust/..." + "code_root_path": "//src/...", + "exclude_test_targets": [ + "//src/cpp/tests:bm_kvs_cpp" + ] } }, "score_orchestrator": { "repo": "https://github.com/eclipse-score/orchestrator.git", "hash": "18e136c34750c5db707f27f917d52efc7541e087", "metadata": { - "code_root_path": "//src/..." + "code_root_path": "//src/...", + "langs": ["rust"] } }, "score_kyron": { "repo": "https://github.com/eclipse-score/kyron.git", "hash": "ed312bdc6a50abc73f97b8c7e2ad4726fed06e81", "metadata": { - "code_root_path": "//src/..." + "code_root_path": "//src/...", + "langs": ["rust"] } }, "score_lifecycle_health": { diff --git a/scripts/quality_runners.py b/scripts/quality_runners.py index 4c4d5e221f..8ea73ddf4d 100644 --- a/scripts/quality_runners.py +++ b/scripts/quality_runners.py @@ -7,6 +7,7 @@ from subprocess import PIPE, Popen from known_good.models.known_good import KnownGood, Path, load_known_good +from known_good.models.module import Module @dataclass @@ -16,7 +17,7 @@ class ProcessResult: exit_code: int -def run_unit_test(known: KnownGood) -> int: +def run_unit_test(known: KnownGood, output_path: Path) -> int: print("Running unit tests...") unit_tests_summary = {} @@ -51,15 +52,15 @@ def run_unit_test(known: KnownGood) -> int: for target in module.metadata.exclude_test_targets ] - print(f"Running command: `{' '.join(call)}`") result = run_command(call) - unit_tests_summary[module.name] = extract_summary(result.stdout) + unit_tests_summary[module.name] = extract_ut_summary(result.stdout) unit_tests_summary[module.name] |= {"exit_code": result.exit_code} generate_markdown_report( unit_tests_summary, - output_path=Path(__file__).parent.parent - / "docs/verification/unit_test_summary.md", + title="Unit Test Execution Summary", + columns=["module", "passed", "failed", "skipped", "total"], + output_path=output_path / "unit_test_summary.md", ) print("UNIT TEST EXECUTION SUMMARY".center(120, "=")) pprint(unit_tests_summary, width=120) @@ -67,19 +68,97 @@ def run_unit_test(known: KnownGood) -> int: return sum(result["exit_code"] for result in unit_tests_summary.values()) -def run_coverage(known: KnownGood) -> int: +def run_coverage(known: KnownGood, output_path: Path) -> int: print("Running coverage analysis...") - ... + coverage_summary = {} + + CURERNTLY_DISABLED_MODULES = [ + "score_communication", + "score_scrample", + "score_logging", + "score_lifecycle_health", + "score_feo", + ] + + for module in known.modules["target_sw"].values(): + if module.name in CURERNTLY_DISABLED_MODULES: + print( + f"Skipping module {module.name} as it is currently disabled for coverage analysis." + ) + continue + else: + print(f"Analyzing coverage in module: {module.name}") + + if "cpp" in module.metadata.langs: + result_cpp = cpp_coverage(module, output_path) + coverage_summary[module.name] = extract_coverage_summary(result_cpp.stdout) + coverage_summary[module.name] |= {"exit_code": result_cpp.exit_code} + + generate_markdown_report( + coverage_summary, + title="Coverage Analysis Summary", + columns=["module", "lines", "functions", "branches"], + output_path=Path(__file__).parent.parent + / "docs/verification/coverage_summary.md", + ) + print("COVERAGE ANALYSIS SUMMARY".center(120, "=")) + pprint(coverage_summary, width=120) + + return sum(result["exit_code"] for result in coverage_summary.values()) + + +def cpp_coverage(module: Module, artifact_dir: Path) -> ProcessResult: + # First we need to run bazel coverage to generate the coverage data files + bazel_call = [ + "bazel", + "coverage", + "--config=unit-tests", + f"--instrumentation_filter=@{module.name}", + "--", + f"@{module.name}{module.metadata.code_root_path}", + ] + [ + # Exclude test targets specified in module metadata, if any + f"-@{module.name}{target}" + for target in module.metadata.exclude_test_targets + ] + bazel_result = run_command(bazel_call) + + # Second we need to run genhtml to generate the HTML report and get the summary + # Create dedicated output directory for this module's coverage reports + output_dir = artifact_dir / "cpp" / module.name + output_dir.mkdir(parents=True, exist_ok=True) + # Find input locations + bazel_coverage_output_directory = run_command( + ["bazel", "info", "output_path"] + ).stdout.strip() + bazel_source_directory = run_command( + ["bazel", "info", "output_base"] + ).stdout.strip() + + genhtml_call = [ + "genhtml", + f"{bazel_coverage_output_directory}/_coverage/_coverage_report.dat", + f"--output-directory={output_dir}", + f"--source-directory={bazel_source_directory}", + "--synthesize-missing", + "--show-details", + "--legend", + "--function-coverage", + "--branch-coverage", + ] + genhtml_result = run_command(genhtml_call) + + return genhtml_result def generate_markdown_report( - data: dict[str, dict[str, int]], output_path: Path = Path("unit_test_summary.md") + data: dict[str, dict[str, int]], + title: str, + columns: list[str], + output_path: Path = Path("unit_test_summary.md"), ) -> None: - # Keys/columns for the table (ordered) - columns = ["module", "passed", "failed", "skipped", "total"] - # Build header and separator - title = "# Unit Test Summary\n" + title = f"# {title}\n" header = "| " + " | ".join(columns) + " |" separator = "| " + " | ".join("---" for _ in columns) + " |" @@ -88,15 +167,7 @@ def generate_markdown_report( for name, stats in data.items(): rows.append( "| " - + " | ".join( - [ - name, - str(stats.get("passed", "")), - str(stats.get("failed", "")), - str(stats.get("skipped", "")), - str(stats.get("total", "")), - ] - ) + + " | ".join([name] + [str(stats.get(col, "")) for col in columns[1:]]) + " |" ) @@ -104,7 +175,7 @@ def generate_markdown_report( output_path.write_text(md) -def extract_summary(logs: str) -> dict[str, int]: +def extract_ut_summary(logs: str) -> dict[str, int]: summary = {"passed": 0, "failed": 0, "skipped": 0, "total": 0} pattern_summary_line = re.compile(r"Test cases: finished.*") @@ -130,6 +201,34 @@ def extract_summary(logs: str) -> dict[str, int]: return summary +def extract_coverage_summary(logs: str) -> dict[str, str]: + """ + Extract coverage summary from genhtml output. + + Args: + logs: Output from genhtml command + + Returns: + Dictionary with coverage percentages for lines, functions, and branches + """ + summary = {"lines": "", "functions": "", "branches": ""} + + # Pattern to match coverage percentages in genhtml output + # Example: " lines......: 93.0% (1234 of 1327 lines)" + pattern_lines = re.compile(r"lines\.+:\s+([\d.]+%)") + pattern_functions = re.compile(r"functions\.+:\s+([\d.]+%)") + pattern_branches = re.compile(r"branches\.+:\s+([\d.]+%)") + + if match := pattern_lines.search(logs): + summary["lines"] = match.group(1) + if match := pattern_functions.search(logs): + summary["functions"] = match.group(1) + if match := pattern_branches.search(logs): + summary["branches"] = match.group(1) + + return summary + + def run_command(command: list[str]) -> ProcessResult: """ Run a command and print output live while storing it. @@ -144,6 +243,7 @@ def run_command(command: list[str]) -> ProcessResult: stdout_data = [] stderr_data = [] + print(f"Running command: `{' '.join(command)}`") with Popen(command, stdout=PIPE, stderr=PIPE, text=True, bufsize=1) as p: # Use select to read from both streams without blocking streams = { @@ -191,14 +291,25 @@ def parse_arguments() -> argparse.Namespace: parser.add_argument( "--unit-tests", action="store_true", - default=True, help="Run unit tests for all modules specified in the known good file", ) + parser.add_argument( + "--unit-tests-output-dir", + type=Path, + default=Path(__file__).parent.parent / "docs/verification", + help="Path to the directory for unit test summary output file", + ) parser.add_argument( "--coverage", action="store_true", help="Run coverage analysis for all modules specified in the known good file", ) + parser.add_argument( + "--coverage-output-dir", + type=Path, + default=Path(__file__).parent.parent / "artifacts/coverage", + help="Path to the directory for coverage output files", + ) return parser.parse_args() @@ -209,12 +320,18 @@ def main() -> int: return_codes = [] if args.unit_tests: - return_codes.append(run_unit_test(known=known)) + return_codes.append( + run_unit_test(known=known, output_path=args.unit_tests_output_dir) + ) if args.coverage: - return_codes.append(run_coverage(known=known)) + args.coverage_output_dir.mkdir(parents=True, exist_ok=True) + return_codes.append( + run_coverage(known=known, output_path=args.coverage_output_dir) + ) - return sum(return_codes) + # Return 0 only if all checks passed, 1 if any failed + return 1 if any(return_codes) else 0 if __name__ == "__main__": - main() + sys.exit(main())