refactor(3p/lisp/mime4cl/test): create one test case per sample file
Since rt.lisp seems to start tests in parallel, the informational output about which sample file is being tested gets mangled in all sorts of ways. The solution is to just loop over the sample files outside a test and schedule a single test case per sample file from there. Change-Id: I4494e4a526ce6d92a298cf7daf06c8013c7ca605 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8569 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
This commit is contained in:
parent
e815b680c0
commit
a4d740af2e
2 changed files with 24 additions and 22 deletions
16
third_party/lisp/mime4cl/test/mime.lisp
vendored
16
third_party/lisp/mime4cl/test/mime.lisp
vendored
|
@ -27,17 +27,15 @@
|
|||
*load-pathname*
|
||||
#P"")))
|
||||
|
||||
(deftest mime.1
|
||||
(loop
|
||||
for f in (directory (make-pathname :defaults *samples-directory*
|
||||
:name :wild
|
||||
:type "msg"))
|
||||
for i from 1
|
||||
do
|
||||
(format t "~A:~%" f)
|
||||
(finish-output)
|
||||
(let* ((orig (mime-message f))
|
||||
(dup (mime-message (with-output-to-string (out) (encode-mime-part orig out)))))
|
||||
(unless (mime= orig dup)
|
||||
(return nil)))
|
||||
finally (return t))
|
||||
t)
|
||||
(add-test (intern (format nil "MIME.~A" i))
|
||||
`(let* ((orig (mime-message ,f))
|
||||
(dup (mime-message
|
||||
(with-output-to-string (out) (encode-mime-part orig out)))))
|
||||
(mime= orig dup))
|
||||
t))
|
||||
|
|
6
third_party/lisp/mime4cl/test/rt.lisp
vendored
6
third_party/lisp/mime4cl/test/rt.lisp
vendored
|
@ -1,5 +1,6 @@
|
|||
#|----------------------------------------------------------------------------|
|
||||
| Copyright 1990 by the Massachusetts Institute of Technology, Cambridge MA. |
|
||||
| Copyright 2023 by the TVL Authors |
|
||||
| |
|
||||
| Permission to use, copy, modify, and distribute this software and its |
|
||||
| documentation for any purpose and without fee is hereby granted, provided |
|
||||
|
@ -23,7 +24,7 @@
|
|||
(:nicknames #:rtest #-lispworks #:rt)
|
||||
(:use #:cl)
|
||||
(:export #:*do-tests-when-defined* #:*test* #:continue-testing
|
||||
#:deftest #:do-test #:do-tests #:get-test #:pending-tests
|
||||
#:deftest #:add-test #:do-test #:do-tests #:get-test #:pending-tests
|
||||
#:rem-all-tests #:rem-test)
|
||||
(:documentation "The MIT regression tester with pfdietz's modifications"))
|
||||
|
||||
|
@ -86,6 +87,9 @@
|
|||
(defmacro deftest (name form &rest values)
|
||||
`(add-entry '(t ,name ,form .,values)))
|
||||
|
||||
(defun add-test (name form &rest values)
|
||||
(funcall #'add-entry (append (list 't name form) values)))
|
||||
|
||||
(defun add-entry (entry)
|
||||
(setq entry (copy-list entry))
|
||||
(do ((l *entries* (cdr l))) (nil)
|
||||
|
|
Loading…
Reference in a new issue