Changeset 15290


Ignore:
Timestamp:
05/30/20 09:59:20 (6 months ago)
Author:
Mark Evenson
Message:

Overhaul CL-BENCH invocation mechanism

New location for CL-BENCH which now contains an ASDF definition.

Location:
trunk/abcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/abcl.asd

    r15262 r15290  
    129129  :perform (test-op (o s)
    130130                    (uiop:symbol-call :abcl.test.cl-bench 'run))
    131   :components ((:module package :pathname "../cl-bench/"
    132                         :components ((:file "defpackage")))
    133                (:module wrapper :pathname "test/lisp/cl-bench/"
    134                         :depends-on (package) :components
    135                         ((:file "wrapper")))))
     131  :components ((:module wrapper :pathname "test/lisp/cl-bench/"
     132                :components ((:file "wrapper")))))
     133
    136134(defsystem abcl/documentation
    137135  :description "Tools to generate LaTeX source from docstrings."
  • trunk/abcl/test/lisp/cl-bench/wrapper.lisp

    r14912 r15290  
    11(defpackage :abcl.test.cl-bench
    22  (:use :cl :asdf)
    3   (:nicknames "cl-bench")
    4   (:export run))
    5 
     3  (:nicknames "CL-BENCH")
     4  (:export #:run))
    65(in-package :abcl.test.cl-bench)
    76
    87(defparameter *cl-bench-master-source-location*
    9   "<http://www.chez.com/emarsden/downloads/cl-bench.tar.gz>")
     8  "<git+https://gitlab.common-lisp.net/ansi-test/cl-bench.git>")
    109
     10;;; Deprecated.  Use ASDF to locate CL-BENCH source
    1111(defparameter *cl-bench-directory*
    1212  (asdf:system-relative-pathname :abcl "../cl-bench/"))
     
    1818  `(progn ,@body))
    1919
     20(defun add-to-asdf (directory &key (asdf-conf-file "cl-bench.conf"))
     21  (let* ((source-registry.conf.d
     22          (merge-pathnames ".config/common-lisp/source-registry.conf.d/"
     23                           (user-homedir-pathname)))
     24         (asdf-conf
     25           (merge-pathnames asdf-conf-file source-registry.conf.d)))
     26    (unless (probe-file source-registry.conf.d)
     27      (ensure-directories-exist source-registry.conf.d))
     28    (when (probe-file asdf-conf)
     29      (format *standard-output* "Overwriting existing ~a" asdf-conf))
     30    (with-open-file (o asdf-conf
     31                       :direction :output :if-exists :supersede)
     32      (write `(:directory ,directory) :stream o))
     33    (format *standard-output* "Configured ASDF via ~%~t~a~% to search~%~t'~a'~%"
     34            asdf-conf directory)))
     35
    2036(defun run ()
     37  (unless (ignore-errors (asdf:find-system :cl-bench))
     38    (if (probe-file *cl-bench-directory*)
     39        (when (probe-file (merge-pathnames "cl-bench.asd" *cl-bench-directory*))
     40          (add-to-asdf *cl-bench-directory*)
     41          (asdf/source-registry:initialize-source-registry)
     42          (unless (ignore-errors (asdf:find-system :cl-bench))
     43            (error "Failed to configure ASDF to find CL-BENCH in ~a" *cl-bench-directory*)))
     44        (error "Please download and install a newer version of CL-BENCH containing an ASDF definition in ~a from ~a"
     45               *cl-bench-directory* *cl-bench-master-source-location*)))
     46  (ql:quickload :cl-bench)
     47  (uiop:symbol-call :cl-bench :bench-run))
     48
     49
     50;;; Deprecated running CL-BENCH without ASDF definition. 
     51(defun old-run () 
    2152  (unless (probe-file *cl-bench-directory*)
    2253    (error "Failed to find the cl-bench test suite in '~A'.~%
Note: See TracChangeset for help on using the changeset viewer.