summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/test-corpus.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/build-aux/test-corpus.scm b/build-aux/test-corpus.scm
index 025837c..740233e 100644
--- a/build-aux/test-corpus.scm
+++ b/build-aux/test-corpus.scm
@@ -53,8 +53,9 @@ parse-email fails to FAIL-DIRECTORY."
(@@ (email email)
read-next-email-in-mbox))
-(define (test-corpus corpus)
- "Test CORPUS, a directory containing mbox files."
+(define (test-corpus corpus fail-directory)
+ "Test CORPUS, a directory containing mbox files. Write emails on which
+the parser failed to FAIL-DIRECTORY."
(for-each (lambda (mbox)
(let ((mbox-path (string-append corpus "/" mbox)))
(display (format "~a~%" mbox-path))
@@ -67,7 +68,7 @@ parse-email fails to FAIL-DIRECTORY."
(lambda ()
(parse-email bv))
(lambda _
- (write-failed-email corpus mbox index bv)))))))
+ (write-failed-email fail-directory corpus mbox index bv)))))))
(const #t)
read-next-email-in-mbox
port)))))
@@ -75,9 +76,9 @@ parse-email fails to FAIL-DIRECTORY."
(define (main fail-directory)
;; Test corpora.
- (test-corpus "guix-commits")
- (test-corpus "guix-patches")
- (test-corpus "bug-guix")
+ (test-corpus "guix-commits" fail-directory)
+ (test-corpus "guix-patches" fail-directory)
+ (test-corpus "bug-guix" fail-directory)
;; If fail directory has any emails, then error out.
(unless (null? (directory-files fail-directory))