Skip to content

S24.05: Move BDD-target binaries from Example/ to Bdd/Targets/<platform>/ #333

Description

@DavidCozens

Parent epic: #254 (E24: Code Hygiene)

Depends on: #332 (S24.04 must land first — this is a pure rename
sweep over what remains)

Overview

After S24.04 leaves one binary per platform (Example/Threaded on
Linux, Example/Windows, Example/FreeRtos/SingleTask), all three
are BDD test infrastructure rather than pedagogical examples. They
live under Example/ for historical reasons and the directory name
Example/FreeRtos/SingleTask/ actively misdescribes its contents
(buffered, two SolidSyslog-touching tasks post-S08.04 slice 2).

Move them under Bdd/ alongside the features and step definitions so
the role is structurally obvious. Frees Example/ for the future
SL1 / SL2 / SL3 pedagogical examples (separate epic, not in scope
here).

Why

  • "Example" misnames test infrastructure.
  • Example/FreeRtos/SingleTask/ directory name is wrong post-S08.04
    slice 2 — it's not single-task any more.
  • Pre-launch (v0.0.0); no external readers to consider.
  • Example/ directory becomes free for genuine pedagogical examples
    later.

In scope

  • Example/Threaded/Bdd/Targets/Linux/
  • Example/Windows/Bdd/Targets/Windows/
  • Example/FreeRtos/SingleTask/Bdd/Targets/FreeRtos/
  • Example/Common/ and Example/FreeRtos/Common/ — likely move too
    (they're consumed only by the moved targets), to Bdd/Targets/Common/
    and Bdd/Targets/FreeRtos/Common/ respectively. Decide as part of
    the slice; if a future SL1 example will reuse ExampleInteractive
    etc., a Bdd/Targets/Shared/ may be the right destination instead.
  • CMake target renames as appropriate. Suggested mapping:
    • SolidSyslogThreadedExampleSolidSyslogBddTargetLinux
    • SolidSyslogExample (Windows .exe) → SolidSyslogBddTargetWindows.exe
    • SolidSyslogFreeRtosSingleTask (.elf) → SolidSyslogBddTargetFreeRtos.elf
      Names are bikeshed-negotiable; pick at implementation time.
  • Bdd/features/environment.py default example_binary paths
    updated to the new locations.
  • .github/workflows/ci.yml ELF artefact upload / download paths for
    build-freertos-targetbdd-freertos-qemu, and any equivalent
    Windows artefact movements.
  • Tests/Example/ directory (host-side unit tests of shared helpers
    like ExampleInteractive, ExampleCommandLine, ExampleAppName,
    …) — move under Tests/Bdd/Targets/ or similar, tracking wherever
    the Common/ directory landed.
  • README's "Four example programs" pitch updated to reflect the new
    shape (one buffered BDD target per platform under Bdd/Targets/).
  • docs/iec62443.md, docs/bdd.md, Bdd/README.md,
    Example/FreeRtos/README.md (if it still exists post-rename) —
    update path references.
  • Bdd/features/steps/syslog_steps.py — drop the THREADED_BINARY
    constant; collapse run_buffered_example routing if S24.04 didn't
    already.

Acceptance criteria

  • Example/ no longer contains any platform-specific subdir
    (only Common/ if it stays — or nothing).
  • Bdd/Targets/Linux/, Bdd/Targets/Windows/, and
    Bdd/Targets/FreeRtos/ exist with the moved sources.
  • bdd-linux-syslog-ng, bdd-windows-otel, and
    bdd-freertos-qemu all green on CI.
  • build-freertos-target / build-windows-msvc / build-linux-gcc
    / build-linux-clang all green.
  • analyze-format, analyze-tidy, analyze-cppcheck all green
    (no broken include paths from the rename).
  • No references to the old Example/<platform>/ paths remain in
    CMakeLists, CI workflow, BDD harness, or docs.

Out of scope

  • Functional changes to the binaries themselves — pure rename.
  • New SL1 / SL2 / SL3 examples.

Risks

  • The --app-name "SolidSyslogThreadedExample" pin in
    Bdd/features/steps/syslog_steps.py::build_threaded_command keeps
    Linux/Windows wire record sizes byte-equal so
    store_capacity.feature's records-per-block math works. After the
    rename, either keep the pin against the new basename or re-audit
    the capacity numbers. Pin-keep is the safer default.
  • CI artefact paths (SolidSyslogFreeRtosSingleTask.elf, etc.) are
    referenced in workflow jobs that depend on each other across the
    bdd-freertos-qemubuild-freertos-target boundary; rename in
    lock-step.
  • Devcontainer launch configurations (Debug FreeRTOS (QEMU)) and
    VS Code task definitions may hard-code the binary path — sweep
    .vscode/ / .devcontainer/ too.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyStory issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions