summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2013-09-09 16:41:58 -0400
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:23:11 -0400
commit0d342f8fcb5d99fbdc0765974570d6c335460904 (patch)
tree20598ee3553c80dfc522852692d7e762bf897067 /Makefile
parentc2c5e53bf7fa9ab1bdeb57b902bc68db936c8f70 (diff)
Btrfs-progs: add make test framework
We need to start adding some sanity tests to btrfs-progs to make sure we aren't breaking things with our patches. The most important of these tools is btrfsck. This patch gets things started by adding a basic btrfsck test that makes sure we can fix a corruption problem we know we can fix. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 997abad8..4e336482 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ libbtrfs_objects = send-stream.o send-utils.o rbtree.o btrfs-list.o crc32c.o \
libbtrfs_headers = send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \
extent_io.h ioctl.h ctree.h btrfsck.h
+TESTS = fsck-tests.sh
INSTALL = install
prefix ?= /usr/local
@@ -123,6 +124,12 @@ $(BUILDDIRS):
@echo "Making all in $(patsubst build-%,%,$@)"
$(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst build-%,%,$@)
+test:
+ $(Q)for t in $(TESTS); do \
+ echo " [TEST] $$t"; \
+ bash tests/$$t || exit 1; \
+ done
+
#
# NOTE: For static compiles, you need to have all the required libs
# static equivalent available