Files
libcoap/scripts/build.sh
T
Jon Shallow d766f9d8ee Update code to build LwIP and Contiki from the examples directory
Update code to use new APIs
[Some code changes modelled on PR #202, some code being moved between files]
Remove #ifdef WITH_LWIP from coap_io.c as file is not used
Add in resource time to lwip
Update for Travis build
Report on Contiki memory allocate failures to ease debugging
Make the different memory type counts configurable by using the -D option
included in a CFLAGS definition to the ./configure command line

.travis.yml
BUILDING
Makefile.libcoap
examples/contiki/Makefile
examples/contiki/README     new
examples/contiki/server.c
examples/contiki/.gitignore (new)
examples/lwip/Makefile
examples/lwip/README
examples/lwip/lwipopts.h
examples/lwip/server-coap.c
examples/lwip/server.c
include/coap/address.h
include/coap/coap_io.h
include/coap/lwippools.h
include/coap/pdu.h
scripts/build.sh
src/address.c
src/coap_io.c
src/coap_io_lwip.c
src/coap_session.c
src/mem.c
src/net.c
src/pdu.c
2018-07-27 15:30:37 +01:00

51 lines
1.4 KiB
Bash
Executable File

#! /bin/sh
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
WITH_TESTS="`scripts/fix-cunit.sh` --enable-tests"
test -f `pwd`/cunit.pc && echo cat `pwd`/cunit.pc
fi
case "x${TLS}" in
xno) WITH_TLS="--disable-dtls"
;;
xopenssl) WITH_TLS="--with-openssl"
;;
xtinydtls) WITH_TLS="--with-tinydtls --disable-shared"
;;
*) WITH_TLS="--with-gnutls"
;;
esac
config() {
echo "./configure $*"
./configure $* || cat config.log
}
case "${PLATFORM}" in
contiki) config "--disable-tests --disable-documentation --disable-examples $WITH_TLS" && \
make -C examples/contiki
;;
lwip) config "--disable-tests --disable-documentation --disable-examples $WITH_TLS" && \
make -C examples/lwip
;;
posix|*) config "$WITH_TESTS --disable-documentation --enable-examples $WITH_TLS" && \
make
;;
esac
err=$?
if test $err = 0 -a -n "$WITH_TESTS" ; then
EXEC_FILE=tests/testdriver
# then run valgrind on the actual executable
libtool --mode=execute valgrind --track-origins=yes --leak-check=yes --show-reachable=yes --error-exitcode=123 --quiet $EXEC_FILE
err=$?
fi
# invoke OSS-Fuzz syntax checks
if test $err = 0 -a -n "$WITH_TESTS" ; then
make -C tests/oss-fuzz -f Makefile.ci check clean
err=$?
fi
exit $err