From 76fa93e2a2002940335c941e76e94d69abd71fe9 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 5 Aug 2012 15:13:12 -0300 Subject: 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 --- test/Makefile.local | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/Makefile.local') 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.* -- cgit v1.2.3