From: Karel Zak Date: Wed, 25 May 2011 14:50:44 +0000 (+0200) Subject: build-sys: cleanup lib/ tests X-Git-Tag: v2.20-rc1~233 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e918cca56287d141f75a9e05d61a545df3553344;p=thirdparty%2Futil-linux.git build-sys: cleanup lib/ tests Signed-off-by: Karel Zak --- diff --git a/lib/Makefile.am b/lib/Makefile.am index a520a78516..3be6cb5727 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -6,21 +6,28 @@ noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \ test_tt test_canonicalize test_strutils test_procutils if LINUX if HAVE_CPU_SET_T -noinst_PROGRAMS += test_cpuset test_sysfs +noinst_PROGRAMS += test_cpuset endif +noinst_PROGRAMS += test_sysfs endif test_blkdev_SOURCES = blkdev.c test_ismounted_SOURCES = ismounted.c test_wholedisk_SOURCES = wholedisk.c test_mangle_SOURCES = mangle.c -#test_at_SOURCES = at.c + +test_at_SOURCES = at.c +test_at_CFLAGS = -DTEST_PROGRAM_AT + test_strutils_SOURCES = strutils.c test_procutils_SOURCES = procutils.c + if LINUX test_cpuset_SOURCES = cpuset.c test_sysfs_SOURCES = sysfs.c at.c +test_sysfs_CFLAGS = -DTEST_PROGRAM_SYSFS endif + test_tt_SOURCES = tt.c $(top_srcdir)/lib/mbsalign.c test_canonicalize_SOURCES = canonicalize.c diff --git a/lib/at.c b/lib/at.c index 6d1cd13f73..cb78112329 100644 --- a/lib/at.c +++ b/lib/at.c @@ -11,8 +11,6 @@ #include "at.h" #include "c.h" -#undef HAVE_FSTATAT - int fstat_at(int dir, const char *dirname, const char *filename, struct stat *st, int nofollow) { @@ -85,7 +83,7 @@ ssize_t readlink_at(int dir, const char *dirname, const char *pathname, #endif } -#ifdef TEST_PROGRAM__DISABLED_FOR_NOW +#ifdef TEST_PROGRAM_AT #include #include #include diff --git a/lib/sysfs.c b/lib/sysfs.c index 1f64c641dd..524c97f557 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -433,7 +433,7 @@ char *sysfs_get_devname(struct sysfs_cxt *cxt, char *buf, size_t bufsiz) return buf; } -#ifdef TEST_PROGRAM +#ifdef TEST_PROGRAM_SYSFS #include #include #include