X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos-cache.impure.lisp;h=46e1a1abe48b175c0c3e106ec2143c78d7cc2b13;hb=9c9d6dbdc28a8bfe70be09f35263e9ec02411d0e;hp=e7a2971bfc4b01ff8351e65b924191fbcda43d1f;hpb=d8659f1e656234e8f0f47d5295b503dd6cff4aba;p=sbcl.git diff --git a/tests/clos-cache.impure.lisp b/tests/clos-cache.impure.lisp index e7a2971..46e1a1a 100644 --- a/tests/clos-cache.impure.lisp +++ b/tests/clos-cache.impure.lisp @@ -64,15 +64,15 @@ (write-line string))))) (defun test-loop () - (note "/~S waiting for permission to run" sb-thread:*current-thread*) - (loop until *run-cache-test*) - (note "/~S joining the tundering herd" sb-thread:*current-thread*) + (note "/~S waiting for permission to run" sb-thread:*current-thread*) + (loop until *run-cache-test* do (sb-thread:thread-yield)) + (note "/~S joining the thundering herd" sb-thread:*current-thread*) (handler-case (loop repeat 1024 do (test-cache)) (error (e) (note "~&Error in cache test in ~S:~%~A~%...aborting" sb-thread:*current-thread* e) - (sb-ext:quit :unix-status 1))) + (sb-ext:exit :code 1))) (note "/~S done" sb-thread:*current-thread*)) #+sb-thread @@ -82,8 +82,10 @@ (mapcar #'sb-thread:join-thread threads)) #-sb-thread -(loop repeat 4 - do (test-loop)) +(progn + (setf *run-cache-test* t) + (loop repeat 4 + do (test-loop))) ;;; Check that the test tests what it was supposed to test: the cache. (assert (sb-pcl::cache-p (sb-pcl::gf-dfun-cache #'cache-test)))