[test] add fake platform (#10594)

This commit adds a fake platform for unit/component tests. This platform
uses virtual time so it should be able to run fast.

Note that the fake platforms leverage C++ virtual methods to allow mocking.

This commit verifies setting active dataset triggers the active dataset
change event by the notifier.
This commit is contained in:
Yakun Xu
2024-10-08 21:00:35 -07:00
committed by GitHub
parent f943729515
commit 8cb529be2a
8 changed files with 790 additions and 2 deletions
+2 -2
View File
@@ -79,11 +79,11 @@ jobs:
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y ninja-build lcov
- name: Build Simulation
run: ./script/cmake-build simulation -DOT_BORDER_ROUTING=ON -DOT_NCP_INFRA_IF=ON
run: ./script/cmake-build simulation -DOT_BUILD_GTEST=ON -DOT_BORDER_ROUTING=ON -DOT_NCP_INFRA_IF=ON
- name: Test Simulation
run: cd build/simulation && ninja test
- name: Build Multipan Simulation
run: ./script/cmake-build simulation -DOT_MULTIPAN_TEST=ON
run: ./script/cmake-build simulation -DOT_BUILD_GTEST=ON -DOT_MULTIPAN_TEST=ON
- name: Test Multipan Simulation
run: cd build/simulation && ninja test
- name: Build POSIX