mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
tests: Don't breed lots of run-tests-nnn directories.
In load.impure.lisp(bug-332), just use a static file. As to creating .fasl in the same directory, lots of tests do that, so running them concurrently from the same source tree is already a bad idea.
This commit is contained in:
parent
8841138417
commit
2a84bc5fed
2
tests/bug-332.lisp
Normal file
2
tests/bug-332.lisp
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(defstruct bug-332 foo)
|
||||
(defstruct bug-332 foo bar)
|
||||
|
|
@ -275,21 +275,12 @@
|
|||
|
||||
(with-test (:name :bug-332)
|
||||
(flet ((stimulate-sbcl ()
|
||||
(let ((filename
|
||||
(format nil "~A/~A.lisp"
|
||||
(or (posix-getenv "TEST_DIRECTORY")
|
||||
(posix-getenv "TMPDIR")
|
||||
"/tmp")
|
||||
(gensym))))
|
||||
(ensure-directories-exist filename)
|
||||
;; create a file which redefines a structure incompatibly
|
||||
(with-open-file (f filename :direction :output :if-exists :supersede)
|
||||
(print '(defstruct bug-332 foo) f)
|
||||
(print '(defstruct bug-332 foo bar) f))
|
||||
;; compile and load the file, then invoke the continue restart on
|
||||
;; the structure redefinition error
|
||||
(handler-bind ((error (lambda (c) (continue c))))
|
||||
(load (compile-file filename))))))
|
||||
;; compile and load the file, then invoke the continue restart on
|
||||
;; the structure redefinition error
|
||||
(handler-bind ((error (lambda (c) (continue c))))
|
||||
(let ((fasl (compile-file "bug-332.lisp")))
|
||||
(load fasl)
|
||||
(ignore-errors (delete-file fasl))))))
|
||||
(stimulate-sbcl)
|
||||
(stimulate-sbcl)
|
||||
(stimulate-sbcl)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue