aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/Makefile.local
diff options
context:
space:
mode:
authorGravatar David Bremner <bremner@debian.org>2012-08-05 15:13:12 -0300
committerGravatar David Bremner <bremner@debian.org>2012-12-02 15:51:32 -0400
commit76fa93e2a2002940335c941e76e94d69abd71fe9 (patch)
treeb7887f136d608312a4fd3fd92bc0f0c871ae4dea /test/Makefile.local
parent990e3988ce0f8ad1993e91635a46904c3c75fff5 (diff)
test: add generator for random "stub" messages
Initial use case is testing dump and restore, so we only have message-ids and tags. The message ID's are nothing like RFC compliant, but it doesn't seem any harder to roundtrip random UTF-8 strings than RFC-compliant ones. Tags are UTF-8, even though notmuch is in principle more generous than that. updated for id:m2wr04ocro.fsf@guru.guru-group.fi - talk about Unicode value rather some specific encoding - call talloc_realloc less times
Diffstat (limited to 'test/Makefile.local')
-rw-r--r--test/Makefile.local10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Makefile.local b/test/Makefile.local
index 8479f914..6a9f15e8 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -16,6 +16,14 @@ $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a
$(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a
$(call quiet,CC) -I. $^ -o $@ -ltalloc
+random_corpus_deps = $(dir)/random-corpus.o $(dir)/database-test.o \
+ notmuch-config.o command-line-arguments.o \
+ lib/libnotmuch.a util/libutil.a \
+ parse-time-string/libparse-time-string.a
+
+$(dir)/random-corpus: $(random_corpus_deps)
+ $(call quiet,CC) $(CFLAGS_FINAL) $^ -o $@ $(CONFIGURE_LDFLAGS)
+
$(dir)/smtp-dummy: $(smtp_dummy_modules)
$(call quiet,CC) $^ -o $@
@@ -29,6 +37,7 @@ $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
TEST_BINARIES=$(dir)/arg-test \
$(dir)/hex-xcode \
+ $(dir)/random-corpus \
$(dir)/parse-time \
$(dir)/smtp-dummy \
$(dir)/symbol-test
@@ -46,5 +55,6 @@ CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o \
$(dir)/arg-test $(dir)/arg-test.o \
$(dir)/hex-xcode $(dir)/hex-xcode.o \
$(dir)/database-test.o \
+ $(dir)/random-corpus $(dir)/random-corpus.o \
$(dir)/parse-time $(dir)/parse-time.o \
$(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*