Compare commits

...

5 Commits
master ... tmp

3 changed files with 8 additions and 15 deletions

View File

@ -25,17 +25,6 @@ matrix:
- libjansson-dev - libjansson-dev
- libgcrypt11-dev - libgcrypt11-dev
env: CFLAGS="-Wall -fsanitize=undefined -fno-sanitize-recover -fsanitize=address" env: CFLAGS="-Wall -fsanitize=undefined -fno-sanitize-recover -fsanitize=address"
# clang
- compiler: clang
addons:
apt:
packages:
- build-essential
env:
- BUILD_LIBS=1
JANSSON_VERSION=v2.1
CFLAGS="-O0 -ggdb -Wall -fsanitize=undefined -fno-sanitize-recover -fsanitize=memory -fPIE -pie"
LDFLAGS="-fsanitize=memory -fPIE -pie -L$HOME/lib"
# w/o libgcrypt # w/o libgcrypt
- addons: - addons:
apt: apt:
@ -121,7 +110,7 @@ script:
- ./configure $TARGET_OPTS $OPTS - ./configure $TARGET_OPTS $OPTS
- make - make
- if [ -z "$WINE_TESTS" ]; then - if [ -z "$WINE_TESTS" ]; then
LD_LIBRARY_PATH="$HOME/lib" make check; LD_LIBRARY_PATH="$HOME/lib" make check VERBOSE=1;
fi fi
- make install - make install
- popd - popd
@ -130,8 +119,9 @@ script:
- ./configure $TARGET_OPTS $OPTS $CONFIGURE_OPTS || { tail -n 1000 config.log; false; }; - ./configure $TARGET_OPTS $OPTS $CONFIGURE_OPTS || { tail -n 1000 config.log; false; };
- make - make
- make example$EXEEXT - make example$EXEEXT
- make test$EXEEXT
- if [ -z "$WINE_TESTS" ]; then - if [ -z "$WINE_TESTS" ]; then
LSAN_OPTIONS=1 LD_LIBRARY_PATH="$HOME/lib" make check; LSAN_OPTIONS=1 LD_LIBRARY_PATH="$HOME/lib" make check VERBOSE=1;
else else
ln -s $HOME/bin/*.dll .libs/; ln -s $HOME/bin/*.dll .libs/;
LSAN_OPTIONS=1 WINEDLLPATH="$PWD/.libs" wine .libs/test.exe; LSAN_OPTIONS=1 WINEDLLPATH="$PWD/.libs" wine .libs/test.exe;

View File

@ -45,7 +45,7 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \ pkgconfig_DATA = \
libblkmaker_jansson-$(LIBBLKMAKER_API_VERSION).pc libblkmaker_jansson-$(LIBBLKMAKER_API_VERSION).pc
dist_noinst_SCRIPTS = autogen.sh dist_noinst_SCRIPTS = autogen.sh test.sh
dist_noinst_DATA = \ dist_noinst_DATA = \
AUTHORS COPYING README \ AUTHORS COPYING README \
example.c \ example.c \
@ -56,7 +56,7 @@ check_PROGRAMS = test
test_SOURCES = test.c test_SOURCES = test.c
test_CFLAGS = $(libbase58_CFLAGS) $(JANSSON_CFLAGS) $(LIBGCRYPT_CFLAGS) test_CFLAGS = $(libbase58_CFLAGS) $(JANSSON_CFLAGS) $(LIBGCRYPT_CFLAGS)
test_LDADD = $(libbase58_LIBS) libblkmaker-@LIBBLKMAKER_API_VERSION@.la libblkmaker_jansson-@LIBBLKMAKER_API_VERSION@.la $(JANSSON_LIBS) $(LIBGCRYPT_LIBS) test_LDADD = $(libbase58_LIBS) libblkmaker-@LIBBLKMAKER_API_VERSION@.la libblkmaker_jansson-@LIBBLKMAKER_API_VERSION@.la $(JANSSON_LIBS) $(LIBGCRYPT_LIBS)
TESTS = test TESTS = test.sh
EXTRA_PROGRAMS = example EXTRA_PROGRAMS = example
example_SOURCES = example.c example_SOURCES = example.c

3
test.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
# To avoid exit codes other than 0 or 1
./test || exit 1