From: Lucas De Marchi Date: Tue, 22 Nov 2011 16:50:50 +0000 (-0200) Subject: Put test back X-Git-Tag: v1~210 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be0e323604c615db2df26e04f37e4ad681fbd73d;p=thirdparty%2Fkmod.git Put test back --- diff --git a/Makefile.am b/Makefile.am index 5d0c0896..f387cf89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,8 +40,8 @@ libkmod_libkmod_la_LDFLAGS = $(AM_LDFLAGS) \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libkmod/libkmod.pc -# TESTS = test-libkmod -# -# check_PROGRAMS = test-libkmod -# test_libkmod_SOURCES = test-libkmod.c -# test_libkmod_LDADD = libkmod/libkmod.la +TESTS = test/test-init + +check_PROGRAMS = test/test-init +test_test_init_SOURCES = test/test-init.c +test_test_init_LDADD = libkmod/libkmod.la diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 00000000..9f66dbd7 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,2 @@ +.dirstamp +test-init diff --git a/test/test-init.c b/test/test-init.c new file mode 100644 index 00000000..140b669c --- /dev/null +++ b/test/test-init.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include +#include +#include + + +int main(int argc, char *argv[]) +{ + struct kmod_ctx *ctx; + + ctx = kmod_new(); + if (ctx == NULL) + exit(EXIT_FAILURE); + + printf("libkmod version %s\n", VERSION); + + kmod_unref(ctx); + + return EXIT_SUCCESS; +}