From be0e323604c615db2df26e04f37e4ad681fbd73d Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Tue, 22 Nov 2011 14:50:50 -0200 Subject: [PATCH] Put test back --- Makefile.am | 10 +++++----- test/.gitignore | 2 ++ test/test-init.c | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 test/.gitignore create mode 100644 test/test-init.c 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; +} -- 2.47.3