]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: cleanup lib/ tests
authorKarel Zak <kzak@redhat.com>
Wed, 25 May 2011 14:50:44 +0000 (16:50 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 25 May 2011 14:50:44 +0000 (16:50 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/Makefile.am
lib/at.c
lib/sysfs.c

index a520a785160eeb425688cf099194bf08c1300645..3be6cb57272c1636b1e8ddc3bd4aba574f96a50c 100644 (file)
@@ -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
 
index 6d1cd13f73bb81500a04a0fdec9ab962455a2b6d..cb781123293f2825a451573f810135d5a3263e40 100644 (file)
--- 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 <errno.h>
 #include <sys/types.h>
 #include <dirent.h>
index 1f64c641ddb81a73ccca7ff6da61e4899c55da90..524c97f55778bd020807c8a8a3c2ac8807494aa2 100644 (file)
@@ -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 <errno.h>
 #include <err.h>
 #include <stdlib.h>