The pkgconfig specification for libcunit1-dev version 2.1-2 is
horribly broken. build.sh (invoked by the travis CI system,
see .travis.yml) now runs a new script fix-cunit.sh when TESTS is
set to 'yes'.
The link step for the native lwip build fails on platforms that
use a glibc version prior 2.17. The reason is that librt is needed
for clock_gettime() in that environment. configure detects this
correctly but the lwip example comes with a simple hand-craftet
Makefile that does not use the configure results.
This quick hack checks for the output of the check for clock_gettime()
and includes the required libraries in order to fix the travis build.
Apparently, the vpath magic in the lwip examples' Makefile requires
the lwip files to exist before the server is built. Thus, the build
script now calls make twice: First, to clone the lwip repositories,
and second, to create the actual server application.
When TESTS=yes is given, the scripts invokes the test driver from
the top build directory. Platform-specific actions hence must ensure
that they stay in that directory and keep the last exit code.
The build script invokes configure and make with different
parameters depending on the environment variables PLATFORM
and TESTS. PLATFORM currently must be one of 'posix', 'contiki', or
'lwip'. If TESTS is set to 'yes' or 'true', the option --enable-tests
will be passed to configure and tests/testdriver will be invoked
after configuration and make.