From: Karel Zak Date: Wed, 18 Feb 2009 14:43:34 +0000 (+0100) Subject: lib: add test_ismounted for regression test X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33bbc9593708f33815ce666d9eab43d5381e30cd;p=util-linux lib: add test_ismounted for regression test Signed-off-by: Karel Zak --- 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) {