summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJustin Husted <sigstop@gmail.com>2019-11-03 00:35:03 -0700
committerKent Overstreet <kent.overstreet@gmail.com>2019-11-03 23:17:43 -0500
commit61bc316a4da4831d8812eb5051732cca27652d8d (patch)
tree3a7309c6010e5b918839319e7fc8140b2968687e /Makefile
parentd79d57ef89000f857158875055b977dbc54354da (diff)
Initial version of bcachefs tests.
So far, these tests just test basic format, fsck, and list functions under valgrind, as well as a few self-validation tests. Signed-off-by: Justin Husted <sigstop@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 2ec19e7f..3c3db9bc 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
PREFIX?=/usr/local
PKG_CONFIG?=pkg-config
INSTALL=install
+PYTEST=pytest-3
CFLAGS+=-std=gnu89 -O2 -g -MMD -Wall \
-Wno-pointer-sign \
-fno-strict-aliasing \
@@ -65,12 +66,18 @@ endif
.PHONY: all
all: bcachefs
+.PHONY: check
+check: tests/test_helper bcachefs
+ cd tests; $(PYTEST)
+
SRCS=$(shell find . -type f -iname '*.c')
DEPS=$(SRCS:.c=.d)
-include $(DEPS)
OBJS=$(SRCS:.c=.o)
-bcachefs: $(OBJS)
+bcachefs: $(filter-out ./tests/%.o, $(OBJS))
+
+tests/test_helper: $(filter ./tests/%.o, $(OBJS))
# If the version string differs from the last build, update the last version
ifneq ($(VERSION),$(shell cat .version 2>/dev/null))
@@ -97,7 +104,7 @@ install: bcachefs
.PHONY: clean
clean:
- $(RM) bcachefs .version $(OBJS) $(DEPS)
+ $(RM) bcachefs tests/test_helper .version $(OBJS) $(DEPS)
.PHONY: deb
deb: all