lwip/travis.sh

66 lines
1.4 KiB
Bash
Raw Normal View History

2018-10-12 18:09:22 +00:00
#!/bin/bash
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
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
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-13 09:06:00 +00:00
# Generate CMake
mkdir build
cd build
/usr/local/bin/cmake .. -G Ninja
ERR=$?
2019-02-03 08:03:22 +00:00
echo Return value from cmake generate: $ERR
if [ $ERR != 0 ]; then
echo "++++++++++++++++++++++++++++++ cmake GENERATE failed"
RETVAL=1
fi
2019-02-03 08:03:22 +00:00
# Build CMake
/usr/local/bin/cmake --build .
ERR=$?
2019-02-03 08:03:22 +00:00
echo Return value from build: $ERR
if [ $ERR != 0 ]; then
echo "++++++++++++++++++++++++++++++ cmake build failed"
RETVAL=1
fi
2019-02-03 08:03:22 +00:00
# Build docs
/usr/local/bin/cmake --build . --target lwipdocs
ERR=$?
2019-02-03 08:03:22 +00:00
echo Return value from lwipdocs: $ERR
if [ $ERR != 0 ]; then
echo "++++++++++++++++++++++++++++++ lwIP documentation failed"
RETVAL=1
fi
2019-02-03 08:03:22 +00:00
# Test different lwipopts.h
cd ..
cd contrib/ports/unix/example_app
./iteropts.sh
ERR=$?
2019-02-03 08:03:22 +00:00
echo Return value from iteropts: $ERR
if [ $ERR != 0 ]; then
echo "++++++++++++++++++++++++++++++ lwIP iteropts test failed"
RETVAL=1
fi
echo Exit value: $RETVAL
exit $RETVAL