diff --git a/.codecov.yml b/.codecov.yml index 6d5d5071b..c7310f3e0 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -9,4 +9,4 @@ ignore: comment: layout: "diff, flags, files" - after_n_builds: 15 + after_n_builds: 16 diff --git a/.github/workflows/simulation.yml b/.github/workflows/simulation.yml index c8c47123f..ef60998cb 100644 --- a/.github/workflows/simulation.yml +++ b/.github/workflows/simulation.yml @@ -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: diff --git a/script/check-simulation-build-autotools b/script/check-simulation-build-autotools index 3f67913f4..c1a50415b 100755 --- a/script/check-simulation-build-autotools +++ b/script/check-simulation-build-autotools @@ -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() diff --git a/script/check-simulation-build-cmake b/script/check-simulation-build-cmake index 00c20807c..cc93ec58a 100755 --- a/script/check-simulation-build-cmake +++ b/script/check-simulation-build-cmake @@ -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() diff --git a/tests/unit/test_platform.cpp b/tests/unit/test_platform.cpp index ad51f46ae..626307143 100644 --- a/tests/unit/test_platform.cpp +++ b/tests/unit/test_platform.cpp @@ -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"