mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
[github-actions] add test to verify OTNS works (#4847)
This commit is contained in:
+1
-1
@@ -9,4 +9,4 @@ ignore:
|
||||
|
||||
comment:
|
||||
layout: "diff, flags, files"
|
||||
after_n_builds: 15
|
||||
after_n_builds: 16
|
||||
|
||||
@@ -62,6 +62,34 @@ jobs:
|
||||
./bootstrap
|
||||
make -f examples/Makefile-simulation distcheck
|
||||
|
||||
cli-ftd-otns:
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
CFLAGS: -m32
|
||||
CXXFLAGS: -m32
|
||||
LDFLAGS: -m32
|
||||
COVERAGE: 1
|
||||
REFERENCE_DEVICE: 1
|
||||
VIRTUAL_TIME: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: '1.13'
|
||||
- name: Bootstrap
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt --no-install-recommends install -y g++-multilib
|
||||
./bootstrap
|
||||
- name: Run OTNS Tests
|
||||
run: |
|
||||
git clone https://github.com/openthread/ot-ns.git --depth 1 --branch master ~/otns
|
||||
export OTDIR=$PWD
|
||||
cd ~/otns
|
||||
./script/test py-unittests py-examples
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
|
||||
cli-ftd:
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
|
||||
@@ -107,6 +107,10 @@ build_all_features()
|
||||
export CPPFLAGS="${options[*]} -DOPENTHREAD_CONFIG_ASSERT_ENABLE=0"
|
||||
reset_source
|
||||
make -f examples/Makefile-simulation
|
||||
|
||||
export CPPFLAGS="${options[*]}"
|
||||
reset_source
|
||||
make -f examples/Makefile-simulation OTNS=1
|
||||
}
|
||||
|
||||
build_nest_common()
|
||||
|
||||
@@ -78,6 +78,12 @@ build_all_features()
|
||||
cmake -GNinja "${options[@]}" ..
|
||||
ninja
|
||||
cd "$OT_SRCDIR"
|
||||
|
||||
reset_source
|
||||
mkdir build && cd build
|
||||
cmake -GNinja "${options[@]}" -DOT_OTNS=on -DOT_SIMULATION_VIRTUAL_TIME=on ..
|
||||
ninja
|
||||
cd ..
|
||||
}
|
||||
|
||||
build_toranj()
|
||||
|
||||
@@ -627,4 +627,11 @@ uint16_t otPlatTimeGetXtalAccuracy(void)
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
||||
|
||||
#if OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
void otPlatOtnsStatus(const char *aStatus)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aStatus);
|
||||
}
|
||||
#endif // OPENTHREAD_CONFIG_OTNS_ENABLE
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user