test/lib: Hook into `make check`
authorJeremy Kerr <jk@ozlabs.org>
Mon, 29 Apr 2013 02:44:53 +0000 (12:44 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 29 Apr 2013 02:44:53 +0000 (12:44 +1000)
This change hooks the new list tests into 'make check'. To do this, we
need to fix the return code of the list-test program.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
test/lib/Makefile.am
test/lib/list-test.c

index 56fea5e6eba65c69e21be3e8aed5c8d70c556f46..5a3a34abcbf2ccee2709d210c060cab1b9dfae58 100644 (file)
@@ -25,6 +25,7 @@ AM_CFLAGS = \
 list_test_SOURCES = list-test.c
 list_test_LDADD = ../../lib/libpbcore.la
 
-noinst_PROGRAMS = list-test
+check_PROGRAMS = list-test
+TESTS = list-test
 
 MAINTAINERCLEANFILES = Makefile.in
index b4ef7abe0babbefcd662410fa517c9aa98f71483..de629eede7da6d80ae45f6ac72f9c6ce7efdca79 100644 (file)
@@ -67,5 +67,5 @@ int main(void)
        }
 
        fprintf(stderr, "-- done --\n");
-       return -1;
+       return EXIT_SUCCESS;
 }