From 33bbc9593708f33815ce666d9eab43d5381e30cd Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Feb 2009 15:43:34 +0100 Subject: [PATCH] lib: add test_ismounted for regression test Signed-off-by: Karel Zak --- lib/Makefile.am | 10 ++++++---- lib/blkdev.c | 2 +- lib/ismounted.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 37205dcd..cd4871aa 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,13 +1,15 @@ include $(top_srcdir)/config/include-Makefile.am -noinst_PROGRAMS = test_blkdev +noinst_PROGRAMS = test_blkdev test_ismounted -test_blkdev_SOURCES = $(top_srcdir)/lib/blkdev.c +test_blkdev_SOURCES = blkdev.c +test_ismounted_SOURCES = ismounted.c if LINUX -test_blkdev_SOURCES += $(top_srcdir)/lib/linux_version.c +test_blkdev_SOURCES += linux_version.c endif -test_blkdev_CFLAGS = -DMAIN_TEST_BLKDEV +test_blkdev_CFLAGS = -DTEST_PROGRAM +test_ismounted_CFLAGS = -DTEST_PROGRAM diff --git a/lib/blkdev.c b/lib/blkdev.c index 79a366ca..7c6c7bab 100644 --- a/lib/blkdev.c +++ b/lib/blkdev.c @@ -107,7 +107,7 @@ blkdev_get_sector_size(int fd, int *sector_size) } -#ifdef MAIN_TEST_BLKDEV +#ifdef TEST_PROGRAM #include #include #include diff --git a/lib/ismounted.c b/lib/ismounted.c index 4c164a95..79a1df6a 100644 --- a/lib/ismounted.c +++ b/lib/ismounted.c @@ -185,7 +185,7 @@ int is_mounted(const char *file) return mount_flags; } -#ifdef DEBUG +#ifdef TEST_PROGRAM int main(int argc, char **argv) { if (argc < 2) { -- 2.39.5