2018-10-12 18:09:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd contrib/ports/unix/check
|
|
|
|
#build and run unit tests
|
|
|
|
make clean all
|
|
|
|
ERR=$?
|
|
|
|
if [ $ERR != 0 ]; then
|
|
|
|
echo "unittests build failed"
|
|
|
|
exit 33
|
|
|
|
fi
|
2018-10-13 09:06:00 +00:00
|
|
|
# Build test using make, this tests the Makefile toolchain
|
2018-10-12 19:42:29 +00:00
|
|
|
make check -j 4
|
|
|
|
|
2018-10-13 09:06:00 +00:00
|
|
|
|
|
|
|
# Build example_app using cmake, this tests the CMake toolchain
|
2018-10-13 08:45:58 +00:00
|
|
|
cd ../../../../
|
2018-10-13 09:06:00 +00:00
|
|
|
# Copy lwipcfg for example app
|
|
|
|
cp contrib/examples/example_app/lwipcfg.h.example contrib/examples/example_app/lwipcfg.h
|
2018-10-12 19:42:29 +00:00
|
|
|
|
2018-10-13 09:06:00 +00:00
|
|
|
# Generate CMake
|
2018-10-13 08:45:58 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
2018-10-13 09:06:00 +00:00
|
|
|
|
|
|
|
# Build CMake
|
2018-10-13 08:45:58 +00:00
|
|
|
ERR=$?
|
|
|
|
if [ $ERR != 0 ]; then
|
2018-10-13 09:06:00 +00:00
|
|
|
echo "cmake build failed"
|
2018-10-13 08:45:58 +00:00
|
|
|
exit 33
|
|
|
|
fi
|
2018-10-13 09:06:00 +00:00
|
|
|
cmake --build . -- -j 4
|