[test] introduce Nexus test framework and platform (#10533)

This commit introduces a new test framework named Nexus. The
framework includes the Nexus platform implementation that emulates
platform behavior, allowing multiple nodes running the OpenThread
core stack to be simulated and interact with each other within the
same process.

Unlike the simulation platform, where nodes run in separate processes
and interact via POSIX sockets, Nexus nodes are simulated within a
single process. Nexus tests can interact directly with the C++ or C
OT core APIs, providing more control than the simulation platform's
CLI-based interactions. The flow of time in Nexus tests is directly
controlled by the test itself, allowing for quick time interval
advancement.

This model allows for faster and more scalable simulations, enabling
quick simulation of larger networks for longer durations.

This commit introduces the basic platform implementation, including:
- `nexus_alarm`, `nexus_radio`, and `nexus_settings` modules.
- Logging support, allowing logs to be distinguished per emulated
  node.
This commit is contained in:
Abtin Keshavarzian
2024-10-09 14:27:54 -07:00
committed by GitHub
parent a79ca11642
commit 287dbfa251
23 changed files with 2152 additions and 2 deletions
+24
View File
@@ -190,6 +190,30 @@ jobs:
run: |
./tests/toranj/build.sh posix-15.4
nexus:
name: nexus
runs-on: ubuntu-20.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: true
- name: Bootstrap
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
sudo apt-get update
sudo apt-get --no-install-recommends install -y clang-10 clang++-10 ninja-build llvm lcov
sudo apt-get --no-install-recommends install -y g++-multilib
- name: Build & Run
run: |
./tests/nexus/build.sh
ninja test
upload-coverage:
needs:
- toranj-cli