util-linux/0009-fsck.cramfs-compile-wi...

50 lines
1.6 KiB
Diff

From 75f03f036011003c2a9e8e634ca3ce7930873318 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 22 Oct 2012 10:10:55 +0200
Subject: [PATCH 09/11] fsck.cramfs: compile with -DINCLUDE_FS_TESTS for make
check
make check
sudo su -
cd tests
./run.sh cramfs
Signed-off-by: Karel Zak <kzak@redhat.com>
---
disk-utils/Makemodule.am | 5 +++++
tests/commands.sh | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/disk-utils/Makemodule.am b/disk-utils/Makemodule.am
index f2360bf..b329a99 100644
--- a/disk-utils/Makemodule.am
+++ b/disk-utils/Makemodule.am
@@ -97,6 +97,11 @@ fsck_cramfs_LDADD = $(LDADD) -lz libcommon.la
sbin_PROGRAMS += mkfs.cramfs
mkfs_cramfs_SOURCES = disk-utils/mkfs.cramfs.c $(cramfs_common_sources)
mkfs_cramfs_LDADD = $(LDADD) -lz libcommon.la
+
+check_PROGRAMS += test_fsck.cramfs
+test_fsck_cramfs_SOURCES = $(fsck_cramfs_SOURCES)
+test_fsck_cramfs_LDADD = $(fsck_cramfs_LDADD)
+test_fsck_cramfs_CFLAGS = $(AM_CFLAGS) -DINCLUDE_FS_TESTS
endif
diff --git a/tests/commands.sh b/tests/commands.sh
index 8a1577e..db1d4ac 100644
--- a/tests/commands.sh
+++ b/tests/commands.sh
@@ -37,7 +37,7 @@ TS_CMD_LOSETUP=${TS_CMD_LOSETUP:-"$top_builddir/losetup"}
TS_CMD_MKSWAP=${TS_CMD_MKSWAP:-"$top_builddir/mkswap"}
TS_CMD_MKCRAMFS=${TS_CMD_MKCRAMFS:-"$top_builddir/mkfs.cramfs"}
TS_CMD_MKMINIX=${TS_CMD_MKMINIX:-"$top_builddir/mkfs.minix"}
-TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/fsck.cramfs"}
+TS_CMD_FSCKCRAMFS=${TS_CMD_FSCKCRAMFS:-"$top_builddir/test_fsck.cramfs"}
TS_CMD_FSCKMINIX=${TS_CMD_FSCKMINIX:-"$top_builddir/fsck.minix"}
TS_CMD_IPCS=${TS_CMD_IPCS:-"$top_builddir/ipcs"}
--
1.7.11.7