source: trunk/abcl/test/lisp/abcl/package.lisp @ 13312

Last change on this file since 13312 was 13312, checked in by Mark Evenson, 10 years ago

Renam RUN-MATCHING to DO-MATCHING improving output.

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1(defpackage #:abcl.test.lisp 
2  (:use #:cl #:abcl-rt)
3  (:nicknames "ABCL-TEST-LISP" "ABCL-TEST")
4  (:export 
5   #:run 
6   #:do-matching #:run-matching
7   #:do-test 
8   #:do-tests))
9(in-package #:abcl.test.lisp)
10
11(defparameter *abcl-test-directory* 
12  (if (find :asdf2 *features*)
13      (asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/")
14      (make-pathname :host (pathname-host *load-truename*)
15                     :device (pathname-device *load-truename*)
16                     :directory (pathname-directory *load-truename*))))
17
18(defun run ()
19  "Run the Lisp test suite for ABCL."
20  (let ((*default-pathname-defaults* *abcl-test-directory*))
21    (do-tests)))
22
23;;; XXX move this into test-utilities.lisp?
24(defvar *last-run-matching* "url-pathname")
25
26(defun do-matching (&optional (match *last-run-matching*))
27  "Run all tests in suite whose symbol contains MATCH in a case-insensitive manner."
28  (setf *last-run-matching* match)
29  (let* ((matching (string-upcase match))
30         (count 0))
31    (mapcar (lambda (entry) 
32              (if (search matching (symbol-name (abcl-rt::name entry)))
33                  (setf (abcl-rt::pend entry) t
34                        count (1+ count))
35                  (setf (abcl-rt::pend entry) nil)))
36            (rest abcl-rt::*entries*))
37    (format t "Performing ~A tests matching '~A'.~%" count matching)
38    (abcl-rt::do-entries t)))
39
40;;; Deprecated
41(setf (symbol-function 'run-matching) #'do-matching)
42
43   
44
45
46 
Note: See TracBrowser for help on using the repository browser.