From 7cb9c2897ce985f2915220131df8b3bd56014aa6 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 1 Dec 2016 00:56:10 +0000 Subject: [PATCH] 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