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
35 changes: 31 additions & 4 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ on:
push:
branches:
- main
tags:
- "v*"
merge_group:
types: [checks_requested]
workflow_call:
Expand All @@ -32,6 +34,7 @@ jobs:
matrix:
include:
- name: bl-x86_64-linux
artifact-name: x86_64-linux
bazel-config: bl-x86_64-linux
working-directory: "."
bazel-build-target: "//..."
Expand All @@ -40,6 +43,7 @@ jobs:
-//score/language/safecpp/aborts_upon_exception:abortsuponexception_toolchain_test
bazel-test-extra-flags: ""
- name: bl-aarch64-linux
artifact-name: aarch64-linux
bazel-config: bl-aarch64-linux
working-directory: "."
bazel-build-target: "//..."
Expand All @@ -51,6 +55,7 @@ jobs:
-//score/os/test:socket_test
bazel-test-extra-flags: "--test_timeout=180,900,2700,10800" # Increase test timeout due to QEMU emulation
- name: x86_64-linux (examples/integration)
artifact-name: x86_64-linux-integration
bazel-config: x86_64-linux
working-directory: "examples/integration"
bazel-build-target: "//..."
Expand Down Expand Up @@ -79,9 +84,31 @@ jobs:
working-directory: ${{ matrix.working-directory }}
run: |
bazel test --config ${{ matrix.bazel-config }} ${{ matrix.bazel-test-extra-flags }} -- ${{ matrix.bazel-test-target }}
- name: Upload test logs on failure
if: failure()
- name: Upload test report
if: always()
uses: actions/upload-artifact@v7
with:
name: bazel-testlogs-${{ matrix.name }}
path: ${{ matrix.working-directory }}/bazel-testlogs/**/test.log
name: test-report-${{ matrix.artifact-name }}
path: |
${{ matrix.working-directory }}/bazel-testlogs/**/test.log
${{ matrix.working-directory }}/bazel-testlogs/**/test.xml
retention-days: 5
if-no-files-found: warn
docs-verify:
uses: eclipse-score/cicd-workflows/.github/workflows/docs-verify.yml@33842dcb0a19ca700d159101a34a7f078bada023
permissions:
contents: read
with:
bazel-docs-verify-target: "//:docs_check"
docs-build:
needs: [docs-verify, linux-build-and-test]
# Still build docs (with whatever test results were uploaded) even if
# linux-build-and-test failed; only skip if docs-verify itself failed.
if: always() && needs.docs-verify.result == 'success'
uses: eclipse-score/cicd-workflows/.github/workflows/docs.yml@33842dcb0a19ca700d159101a34a7f078bada023
permissions:
contents: read
with:
bazel-target: "//:docs"
retention-days: 5
tests-report-artifact: "test-report-x86_64-linux"
42 changes: 0 additions & 42 deletions .github/workflows/docs_ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docs_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name: Publish Documentation
on:
workflow_run:
workflows: ["Documentation CI"]
workflows: ["Bazel Build (Linux)"]
types: [completed]
permissions:
actions: read
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ The Components documentation provides detailed documentation for each individual
Quick Start - Building and Testing
==================================

For build instructions, usage examples, and configuration options, refer to the `README <https://github.com/eclipse-score/baselibs/blob/main/README.md>`_ in the `eclipse-score/baselibs <https://github.com/eclipse-score/baselibs>`_ repository.
For build instructions, usage examples, and configuration options, refer to the `README <https://github.com/eclipse-score/baselibs/blob/main/README.md>`_ in the `eclipse-score/baselibs <https://github.com/eclipse-score/baselibs>`_ repository.
6 changes: 6 additions & 0 deletions docs/verification_report/module_verification_report.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Verification Report contains:
- For external component Assumptions of Use: coverage by platform safety manual or feature/components incl. test case, passed/failed and completeness verdict
- This is split in a list of QM requirements tested and a separate list of tests for ASIL rated requirements.
- List of component requirements (ASIL rated) linked to inspection checklist and verdict (derived from PR export)
- See :ref:`requirements_statistics` for the generated requirements coverage statistics.

**1.2. on Architecture**
- List of component architecture tags tested by which test case, passed/failed and completeness verdict
Expand Down Expand Up @@ -81,3 +82,8 @@ Verification Report contains:
**Note1:** The verification report is valid for the module version tagged together with the report

**Note2:** All the above lists are generated automatically

.. toctree::
:maxdepth: 1

requirements_statistics
64 changes: 64 additions & 0 deletions docs/verification_report/requirements_statistics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.. _requirements_statistics:

Component Requirements Statistics
=================================

This page gives an overview of the component requirements (``comp_req``) defined for
baselibs: how many are valid, how many are covered by tests, and the current test
results. Use the tables below to drill down into individual requirements.

.. raw:: html

<style>
/* Smaller font keeps the wide requirement tables below readable without
excessive scrolling. */
table.compact-needtable {
font-size: 0.75em;
}
/* needpie renders a fixed 768x384px SVG; keep it from overflowing on
narrow viewports (e.g. mobile) instead of causing horizontal scroll. */
img[id^="needpie-"] {
max-width: 100%;
height: auto;
}
</style>

Overview
--------

.. needpie:: Requirements Status
:labels: invalid, valid and not tested, valid and tested
:colors: red,yellow, green

type == 'comp_req' and status == 'invalid'
type == 'comp_req' and testlink == '' and (status == 'valid' or status == 'invalid')
type == 'comp_req' and testlink != '' and (status == 'valid' or status == 'invalid')

.. needpie:: Test Results
:labels: passed, failed, skipped
:colors: green, red, orange

type == 'testcase' and result == 'passed'
type == 'testcase' and result == 'failed'
type == 'testcase' and result == 'skipped'

Requirements Without Tests
--------------------------

Valid requirements that are not yet covered by any test.

.. needtable:: REQUIREMENTS WITHOUT TESTS
:filter: type == "comp_req" and status == "valid" and testlink == ""
:columns: id;title;satisfied_by as "Satisfied by";safety as "Safety"
:class: compact-needtable

Requirements With Tests
-----------------------

Valid requirements that are covered by at least one test, along with the tests
verifying them.

.. needtable:: REQUIREMENTS WITH TESTS
:filter: type == "comp_req" and status == "valid" and testlink != ""
:columns: id;title;satisfied_by as "Satisfied by";safety as "Safety";testlink as "Tests"
:class: compact-needtable
36 changes: 17 additions & 19 deletions score/flatbuffers/details/flatfbuffer_allocator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class SimpleAllocator : public ::flatbuffers::Allocator

TEST(AllocatorTest, AllocateReturnsNonNull)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::allocate, ::flatbuffers::Allocator::deallocate");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "allocate returns a non-null pointer; deallocate does not crash");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "equivalence-classes");
Expand All @@ -90,10 +90,10 @@ TEST(AllocatorTest, AllocateReturnsNonNull)

TEST(AllocatorTest, AllocateSingleByte)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::allocate, ::flatbuffers::Allocator::deallocate");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "allocate and deallocate a single byte");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "boundary-value-analysis");
RecordProperty("DerivationTechnique", "boundary-values");

SimpleAllocator alloc;
uint8_t* ptr = alloc.allocate(1U);
Expand All @@ -105,10 +105,10 @@ TEST(AllocatorTest, AllocateSingleByte)

TEST(AllocatorTest, AllocateLargeRegion)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::allocate, ::flatbuffers::Allocator::deallocate");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "allocate and deallocate a large (1 MiB) region");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "boundary-value-analysis");
RecordProperty("DerivationTechnique", "boundary-values");

SimpleAllocator alloc;
constexpr size_t kSize = static_cast<size_t>(1024U) * 1024U; // 1 MiB
Expand All @@ -122,9 +122,7 @@ TEST(AllocatorTest, AllocateLargeRegion)

TEST(AllocatorTest, UsableThroughBasePointer)
{
RecordProperty("FullyVerifies",
"::flatbuffers::Allocator::allocate, ::flatbuffers::Allocator::deallocate, "
"::flatbuffers::Allocator::~Allocator");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "allocator is usable through a base-class pointer; virtual destructor is exercised");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "equivalence-classes");
Expand Down Expand Up @@ -155,7 +153,7 @@ class AllocatorGrowsBufferTest : public ::testing::TestWithParam<GrowsBufferPara

TEST_P(AllocatorGrowsBufferTest, GrowsBuffer)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward grows the buffer and returns a non-null pointer");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "equivalence-classes");
Expand Down Expand Up @@ -193,7 +191,7 @@ class AllocatorPreservesBackDataTest : public ::testing::TestWithParam<BackDataP

TEST_P(AllocatorPreservesBackDataTest, PreservesBackData)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward copies in_use_back bytes to the tail of the new buffer");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "equivalence-classes");
Expand Down Expand Up @@ -239,7 +237,7 @@ class AllocatorPreservesFrontDataTest : public ::testing::TestWithParam<FrontDat

TEST_P(AllocatorPreservesFrontDataTest, PreservesFrontData)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward copies in_use_front bytes to the head of the new buffer");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "equivalence-classes");
Expand Down Expand Up @@ -286,10 +284,10 @@ class AllocatorPreservesBothDataTest : public ::testing::TestWithParam<BothDataP

TEST_P(AllocatorPreservesBothDataTest, PreservesBothFrontAndBackData)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward preserves both front and back in-use regions simultaneously");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "boundary-value-analysis");
RecordProperty("DerivationTechnique", "boundary-values");

const auto [old_size, new_size, back_size, front_size] = GetParam();
SimpleAllocator alloc;
Expand Down Expand Up @@ -330,10 +328,10 @@ INSTANTIATE_TEST_SUITE_P(SizeRanges,

TEST(AllocatorReallocateDownwardTest, PreserveFrontAndBackIfAllocatingNewSizeFails)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward preserves front and back if new size cannot be allocated");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "boundary-value-analysis");
RecordProperty("DerivationTechnique", "boundary-values");

SimpleAllocator alloc;
constexpr size_t kOldSize = 64U;
Expand Down Expand Up @@ -378,10 +376,10 @@ TEST(AllocatorReallocateDownwardTest, PreserveFrontAndBackIfAllocatingNewSizeFai

TEST(AllocatorReallocateDownwardTest, AssertsWhenNewSizeEqualsOldSize)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward asserts when new_size equals old_size");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "boundary-value-analysis");
RecordProperty("DerivationTechnique", "boundary-values");

EXPECT_DEATH(
{
Expand All @@ -395,10 +393,10 @@ TEST(AllocatorReallocateDownwardTest, AssertsWhenNewSizeEqualsOldSize)

TEST(AllocatorReallocateDownwardTest, AssertsWhenNewSizeSmallerThanOldSize)
{
RecordProperty("FullyVerifies", "::flatbuffers::Allocator::reallocate_downward");
RecordProperty("PartiallyVerifies", "comp_req__flatbuffers__serialization");
RecordProperty("Description", "reallocate_downward asserts when new_size is smaller than old_size");
RecordProperty("TestType", "interface-test");
RecordProperty("DerivationTechnique", "boundary-value-analysis");
RecordProperty("DerivationTechnique", "boundary-values");

EXPECT_DEATH(
{
Expand Down
Loading