wrapper.lisp 1.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
(defpackage :abcl.test.cl-bench
  (:use :cl :asdf)
  (:nicknames "cl-bench")
  (:export run))

(in-package :abcl.test.cl-bench)

(defparameter *cl-bench-master-source-location*
  "<http://www.chez.com/emarsden/downloads/cl-bench.tar.gz>")

(defparameter *cl-bench-directory*
12
  (asdf:system-relative-pathname :abcl "../cl-bench/"))
13
  
14 15 16 17 18 19
;;; cl-bench defines BENCH-GC and WITH-SPAWNED-THREAD in
;;; '*cl-bench-directory*/sysdep/setup-ablisp.lisp'.  
(defun cl-bench::bench-gc () (ext:gc))
(defmacro cl-bench::with-spawned-thread (&body body)
  `(progn ,@body))

20 21
(defun run ()
  (unless (probe-file *cl-bench-directory*)
22 23 24 25 26
    (error "Failed to find the cl-bench test suite in '~A'.~%
Please manually download and extract the cl-bench tool suite~%
from ~A to run the tests."
           *cl-bench-directory*
           *cl-bench-master-source-location*))
27 28 29 30 31 32 33 34 35
  (let ((*default-pathname-defaults* *cl-bench-directory*))
    (if (find :unix *features*)
        (run-shell-command 
         (format nil "cd ~A; make clean optimize-files" *cl-bench-directory*))
        (run-shell-command "cd ~A && make clean optimize-files" *cl-bench-directory*))
    (load "generate.lisp")
    (load "do-compilation-script.lisp")
    (load "do-execute-script.lisp")))