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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/test_and_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ jobs:
- name: Checkout repository
if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
# Required by the baselibs integration tests below.
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
Expand Down Expand Up @@ -99,6 +102,12 @@ jobs:
- name: Execute Feature Integration Tests
run: |
bazel test --config=linux-x86_64 //feature_integration_tests/test_cases:fit
- name: Execute Baselibs Integration Tests
# Must run in this job, before the docs build: its source code linker
# turns the tests' Verifies properties into `testlink`s on the baselibs
# feature requirements.
run: |
bazel test --lockfile_mode=error --config=linux-x86_64 //feature_integration_tests/baselibs_integration_tests:bit
- name: Install uv (required for SBOM license scanning)
uses: astral-sh/setup-uv@v5
with:
Expand Down
91 changes: 91 additions & 0 deletions feature_integration_tests/baselibs_integration_tests/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@rules_python//python:defs.bzl", "py_library")
load("@score_itf//:defs.bzl", "py_itf_test")

package(default_visibility = ["//feature_integration_tests/baselibs_integration_tests:__subpackages__"])

config_setting(
name = "config_linux_x86_64",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
"@score_bazel_platforms//runtime_es:posix",
],
)

config_setting(
name = "config_qnx_x86_64",
constraint_values = [
"@platforms//os:qnx",
"@platforms//cpu:x86_64",
"@score_bazel_platforms//runtime_es:posix",
],
)

py_library(
name = "test_app_runner",
srcs = ["test_app_runner.py"],
# Lets the test `import test_app_runner` as a flat top-level module.
imports = ["."],
)

py_itf_test(
name = "bit",
srcs = ["test_baselibs_features.py"],
args = select(
{
":config_linux_x86_64": [
"--docker-image-bootstrap=$(location //images/linux_x86_64:image_load)",
"--docker-image=score_showcases:latest",
],
":config_qnx_x86_64": [
"--qemu-config=$(location //feature_integration_tests/configs:qemu_bridge_config.json)",
"--qemu-image=$(location //images/qnx_x86_64:image)",
],
},
no_match_error = "Unsupported platform",
),
data = select({
":config_linux_x86_64": [
"//images/linux_x86_64:image_load",
],
":config_qnx_x86_64": [
"//feature_integration_tests/configs:qemu_bridge_config.json",
"//images/qnx_x86_64:image",
],
}),
plugins = select(
{
":config_linux_x86_64": [
"@score_itf//score/itf/plugins:docker_plugin",
],
":config_qnx_x86_64": [
"@score_itf//score/itf/plugins:qemu_plugin",
],
},
no_match_error = "Unsupported platform",
) + [
# Records PartiallyVerifies (via the `@add_test_properties` decorator)
# into the JUnit XML. docs-as-code's source code linker turns those
# properties into `testlink` attributes on the referenced baselibs
# feature requirement needs.
"@score_itf//score/itf/plugins:attribute_plugin",
],
tags = [
"manual",
],
deps = [
":test_app_runner",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@score_baselibs//score/flatbuffers/bazel:codegen.bzl", "generate_cpp")

# Generated C++ header for the flatbuffers subcommand's sample schema.
generate_cpp(
name = "gen_baselibs_sample_h",
output = "baselibs_sample_generated.h",
schema = "baselibs_sample.fbs",
)

# On-target test app exercising one baselibs feature library per subcommand. It
# is bundled into //images/linux_x86_64:image (see that package's BUILD) and
# driven by the baselibs integration tests in the parent package.
cc_binary(
name = "baselibs_test_app",
srcs = [
"main.cpp",
":gen_baselibs_sample_h",
],
tags = ["manual"],
visibility = ["//visibility:public"],
deps = [
"@score_baselibs//score/bitmanipulation",
"@score_baselibs//score/concurrency:notification",
"@score_baselibs//score/containers:dynamic_array",
"@score_baselibs//score/filesystem",
"@score_baselibs//score/flatbuffers:flatbufferscpp",
"@score_baselibs//score/hash/code/crc:crc_ieee",
"@score_baselibs//score/json",
"@score_baselibs//score/language/futurecpp",
"@score_baselibs//score/memory:pmr_ring_buffer",
"@score_baselibs//score/result",
"@score_baselibs//score/static_reflection_with_serialization/serialization",
"@score_baselibs//score/utils:base64",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// ******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available under the
// terms of the Apache License Version 2.0 which is available at
// https://www.apache.org/licenses/LICENSE-2.0
//
// SPDX-License-Identifier: Apache-2.0
// ******************************************************************************

// Minimal FlatBuffers schema for the baselibs flatbuffers feature test. A keyed
// `Item` table lets the generated code build a sorted vector and look items up
// by key, which exercises the schema-generated C++ API end-to-end.

namespace score.ri.baselibs_sample;

table Item {
id:int (key);
label:string;
}

table Container {
items:[Item];
}

root_type Container;
Loading
Loading