(eval-when (:compile-toplevel :load-toplevel :execute)
(require :sb-posix))
-;;; run-program on Windows doesn't have an :environment parameter,
-;;; set these globally
(sb-posix:putenv (format nil "SBCL_MACHINE_TYPE=~A" (machine-type)))
(sb-posix:putenv (format nil "SBCL_SOFTWARE_TYPE=~A" (software-type)))
&body body)
(let ((block-name (gensym))
#+sb-thread (threads (gensym "THREADS")))
+ (flet ((name-ok (x y)
+ (declare (ignore y))
+ (typecase x
+ (symbol (let ((package (symbol-package x)))
+ (or (null package)
+ (eql package (find-package "CL"))
+ (eql package (find-package "KEYWORD"))
+ (eql (mismatch "SB-" (package-name package)) 3))))
+ (integer t))))
+ (unless (tree-equal name name :test #'name-ok)
+ (error "test name must be all-keywords: ~S" name)))
`(progn
(start-test)
(cond
(unless (or (not (sb-thread:thread-alive-p thread))
(eql thread sb-thread:*current-thread*)
(member thread ,threads)
- (sb-thread:thread-emphemeral-p thread))
+ (sb-thread:thread-ephemeral-p thread))
(setf any-leftover thread)
(ignore-errors (sb-thread:terminate-thread thread))))
(when any-leftover