[github-actions] add test to verify OTNS works (#4847)

This commit is contained in:
Simon Lin
2020-05-21 11:34:19 +08:00
committed by GitHub
parent 99e0666082
commit bdfafb437e
5 changed files with 46 additions and 1 deletions
+1 -1
View File
@@ -9,4 +9,4 @@ ignore:
comment:
layout: "diff, flags, files"
after_n_builds: 15
after_n_builds: 16
+28
View File
@@ -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:
+4
View File
@@ -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()
+6
View File
@@ -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()
+7
View File
@@ -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"