From 7605755747101015ee9aebc62b2ea509901c5e48 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 1 Dec 2016 00:56:10 +0000 Subject: [PATCH 1/4] Bugfix: Wrap test program to ensure the exit code is always 0/pass or 1/fail --- Makefile.am | 4 ++-- test.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 test.sh diff --git a/Makefile.am b/Makefile.am index a02d92a..137b20c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -45,7 +45,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libblkmaker_jansson-$(LIBBLKMAKER_API_VERSION).pc -dist_noinst_SCRIPTS = autogen.sh +dist_noinst_SCRIPTS = autogen.sh test.sh dist_noinst_DATA = \ AUTHORS COPYING README \ example.c \ @@ -56,7 +56,7 @@ check_PROGRAMS = test test_SOURCES = test.c 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) -TESTS = test +TESTS = test.sh EXTRA_PROGRAMS = example example_SOURCES = example.c diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..67b5ebc --- /dev/null +++ b/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# To avoid exit codes other than 0 or 1 +./test || exit 1 From b8055bd4952939b621e936820a6264e919176914 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 1 Dec 2016 01:04:04 +0000 Subject: [PATCH 2/4] Travis: Set VERBOSE for `make check` --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5df1ac3..9c4e44e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -121,7 +121,7 @@ script: - ./configure $TARGET_OPTS $OPTS - make - if [ -z "$WINE_TESTS" ]; then - LD_LIBRARY_PATH="$HOME/lib" make check; + LD_LIBRARY_PATH="$HOME/lib" make check VERBOSE=1; fi - make install - popd @@ -131,7 +131,7 @@ script: - make - make example$EXEEXT - 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 ln -s $HOME/bin/*.dll .libs/; LSAN_OPTIONS=1 WINEDLLPATH="$PWD/.libs" wine .libs/test.exe; From 15f79c6f715f14ba1ec9c19f88be656ba0b30906 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 1 Dec 2016 10:19:37 +0000 Subject: [PATCH 3/4] Travis: Bugfix: Explicitly make test program in case we run it directly --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 9c4e44e..4610ce7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -130,6 +130,7 @@ script: - ./configure $TARGET_OPTS $OPTS $CONFIGURE_OPTS || { tail -n 1000 config.log; false; }; - make - make example$EXEEXT + - make test$EXEEXT - if [ -z "$WINE_TESTS" ]; then LSAN_OPTIONS=1 LD_LIBRARY_PATH="$HOME/lib" make check VERBOSE=1; else From 2a379336980e8dc661ace8ef267c9fcbb241da35 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 1 Dec 2016 11:12:49 +0000 Subject: [PATCH 4/4] Travis: Remove MemorySanitizer job for now, since it's broken with latest Linux kernel --- .travis.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4610ce7..68fd444 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,17 +25,6 @@ matrix: - libjansson-dev - libgcrypt11-dev 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 - addons: apt: