2018-10-12 18:09:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-02-03 08:36:44 +00:00
|
|
|
RETVAL=0
|
|
|
|
|
2018-10-12 18:09:22 +00:00
|
|
|
cd contrib/ports/unix/check
|
2019-02-03 08:03:22 +00:00
|
|
|
|
2018-10-12 18:09:22 +00:00
|
|
|
#build and run unit tests
|
|
|
|
make clean all
|
2019-02-03 08:03:22 +00:00
|
|
|
|
|
|
|
# Build test using make, this tests the Makefile toolchain
|
|
|
|
make check -j 4
|
2018-10-12 18:09:22 +00:00
|
|
|
ERR=$?
|
2019-02-03 08:03:22 +00:00
|
|
|
echo Return value from unittests: $ERR
|
2018-10-12 18:09:22 +00:00
|
|
|
if [ $ERR != 0 ]; then
|
2019-02-03 08:36:44 +00:00
|
|
|
echo "++++++++++++++++++++++++++++++ unittests build failed"
|
|
|
|
RETVAL=1
|
2018-10-12 18:09:22 +00:00
|
|
|
fi
|
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
|
2018-10-14 07:44:12 +00:00
|
|
|
cp contrib/examples/example_app/lwipcfg.h.travis 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
|
2018-10-18 09:05:07 +00:00
|
|
|
/usr/local/bin/cmake .. -G Ninja
|
2018-10-13 08:45:58 +00:00
|
|
|
ERR=$?
|
2019-02-03 08:03:22 +00:00
|
|
|
echo Return value from cmake generate: $ERR
|
2018-10-13 08:45:58 +00:00
|
|
|
if [ $ERR != 0 ]; then
|
2019-02-03 08:36:44 +00:00
|
|
|
echo "++++++++++++++++++++++++++++++ cmake GENERATE failed"
|
|
|
|
RETVAL=1
|
2018-10-13 08:45:58 +00:00
|
|
|
fi
|
2019-02-03 08:03:22 +00:00
|
|
|
|
|
|
|
# Build CMake
|
2018-10-22 15:18:34 +00:00
|
|
|
/usr/local/bin/cmake --build .
|
2018-10-18 08:58:29 +00:00
|
|
|
ERR=$?
|
2019-02-03 08:03:22 +00:00
|
|
|
echo Return value from build: $ERR
|
2018-10-18 08:58:29 +00:00
|
|
|
if [ $ERR != 0 ]; then
|
2019-02-03 08:36:44 +00:00
|
|
|
echo "++++++++++++++++++++++++++++++ cmake build failed"
|
|
|
|
RETVAL=1
|
2018-10-18 08:58:29 +00:00
|
|
|
fi
|
|
|
|
|
2019-02-03 08:03:22 +00:00
|
|
|
# Build docs
|
2018-10-18 08:58:29 +00:00
|
|
|
/usr/local/bin/cmake --build . --target lwipdocs
|
|
|
|
ERR=$?
|
2019-02-03 08:03:22 +00:00
|
|
|
echo Return value from lwipdocs: $ERR
|
2018-10-18 08:58:29 +00:00
|
|
|
if [ $ERR != 0 ]; then
|
2019-02-03 08:36:44 +00:00
|
|
|
echo "++++++++++++++++++++++++++++++ lwIP documentation failed"
|
|
|
|
RETVAL=1
|
2018-10-18 08:58:29 +00:00
|
|
|
fi
|
2018-10-18 19:15:48 +00:00
|
|
|
|
2019-02-03 08:03:22 +00:00
|
|
|
# Test different lwipopts.h
|
2018-10-18 19:15:48 +00:00
|
|
|
cd ..
|
|
|
|
cd contrib/ports/unix/example_app
|
|
|
|
./iteropts.sh
|
2019-02-02 22:04:52 +00:00
|
|
|
ERR=$?
|
2019-02-03 08:03:22 +00:00
|
|
|
echo Return value from iteropts: $ERR
|
2019-02-02 22:04:52 +00:00
|
|
|
if [ $ERR != 0 ]; then
|
2019-02-03 08:36:44 +00:00
|
|
|
echo "++++++++++++++++++++++++++++++ lwIP iteropts test failed"
|
|
|
|
RETVAL=1
|
2019-02-02 22:04:52 +00:00
|
|
|
fi
|
2019-02-03 08:36:44 +00:00
|
|
|
|
|
|
|
echo Exit value: $RETVAL
|
|
|
|
exit $RETVAL
|