mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 10:58:10 +01:00
519be19250
Add a smoke testing tool to support testing the date/time parser module directly and independent of the rest of notmuch. Credits to Michal Sojka <sojkam1@fel.cvut.cz> for the stdin parsing idea and consequent massive improvement in testability.
40 lines
1,007 B
Makefile
40 lines
1,007 B
Makefile
# -*- makefile -*-
|
|
|
|
dir := test
|
|
|
|
extra_cflags += -I.
|
|
|
|
smtp_dummy_srcs = \
|
|
$(notmuch_compat_srcs) \
|
|
$(dir)/smtp-dummy.c
|
|
|
|
smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
|
|
|
|
$(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a
|
|
$(call quiet,CC) -I. $^ -o $@
|
|
|
|
$(dir)/smtp-dummy: $(smtp_dummy_modules)
|
|
$(call quiet,CC) $^ -o $@
|
|
|
|
$(dir)/symbol-test: $(dir)/symbol-test.o
|
|
$(call quiet,CXX) $^ -o $@ -Llib -lnotmuch $(XAPIAN_LDFLAGS)
|
|
|
|
$(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
|
|
$(call quiet,CC) $^ -o $@
|
|
|
|
.PHONY: test check
|
|
|
|
test-binaries: $(dir)/arg-test $(dir)/smtp-dummy $(dir)/symbol-test \
|
|
$(dir)/parse-time
|
|
|
|
test: all test-binaries
|
|
@${dir}/notmuch-test $(OPTIONS)
|
|
|
|
check: test
|
|
|
|
SRCS := $(SRCS) $(smtp_dummy_srcs)
|
|
CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o \
|
|
$(dir)/symbol-test $(dir)/symbol-test.o \
|
|
$(dir)/arg-test $(dir)/arg-test.o \
|
|
$(dir)/parse-time $(dir)/parse-time.o \
|
|
$(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*
|