X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-util.lisp;h=40726a477512502dcc94d8725d580808af35d0b8;hb=18c093eb771c1ab038090863d99bf4baf4224966;hp=c4e4804286ef69e72a698c8ef9b463ff8a603b95;hpb=62f92bd02e9c04a46893ff9e7b88acdaeab230fa;p=sbcl.git diff --git a/tests/test-util.lisp b/tests/test-util.lisp index c4e4804..40726a4 100644 --- a/tests/test-util.lisp +++ b/tests/test-util.lisp @@ -17,6 +17,14 @@ (defvar *threads-to-kill*) (defvar *threads-to-join*) +(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))) + #+sb-thread (defun make-kill-thread (&rest args) (let ((thread (apply #'sb-thread:make-thread args))) @@ -130,11 +138,6 @@ (defun skipped-p (skipped-on) (sb-impl::featurep skipped-on)) -(defun test-env () - (cons (format nil "SBCL_MACHINE_TYPE=~A" (machine-type)) - (cons (format nil "SBCL_SOFTWARE_TYPE=~A" (software-type)) - (posix-environ)))) - ;;; Repeat calling THUNK until its cumulated runtime, measured using ;;; GET-INTERNAL-RUN-TIME, is larger than PRECISION. Repeat this ;;; REPETITIONS many times and return the time one call to THUNK took