mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-18 21:49:05 +03:00
scripts/build.sh: Added build script to facilitate CI
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.
This commit is contained in:
1 parent
8a8790cfc3
commit
641b8ed196
1 file changed
+25
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test "x$TESTS" = "xyes" -o "x$TESTS" = "xtrue" ; then
|
||||
WITH_TESTS=--enable-tests
|
||||
fi
|
||||
|
||||
config() {
|
||||
echo "./configure $*"
|
||||
./configure $*
|
||||
}
|
||||
|
||||
case "${PLATFORM}" in
|
||||
contiki) config "--disable-tests --disable-documentation --disable-examples" && \
|
||||
(cd examples/contiki && make V=1 contiki all)
|
||||
;;
|
||||
lwip) config "--disable-tests --disable-documentation --disable-examples" && \
|
||||
(cd examples/lwip && make lwip lwip-contrib all)
|
||||
;;
|
||||
posix|*) config "$WITH_TESTS --enable-documentation --enable-examples" && make
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$WITH_TESTS" ; then
|
||||
tests/testdriver
|
||||
fi
|
||||
Reference in new issue
Block a user