Changeset 13924


Ignore:
Timestamp:
05/04/12 09:14:24 (9 years ago)
Author:
Mark Evenson
Message:

ansi-tests: DO-TESTS-MATCHING will run all case-insensitive matching tests.

An ASDF load of ANSI-INTERPRETED now loads the interpreted tests into
memory via an :around specialization.

Changes in ABCL.TEST.ANSI (aka ANSI-TESTS):

DO-TESTS-MATCHING implemented (cribbed from ABCL-TEST-LISP).

Refactored DEFPACKAGE forms out of ABCL-ANSI-TESTS code, creating
abcl-ansi.lisp to hold all other forms.

Import symbols from REGRESSION-TEST where it makes sense (list could
probably be larger; why not just use the package?)

Location:
trunk/abcl
Files:
1 added
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/abcl/abcl.asd

    r13607 r13924  
    6767   (funcall (intern (symbol-name 'run) :abcl.test.lisp)))
    6868
    69 ;;; Test ABCL with the interpreted ANSI tests
    70 (defsystem :ansi-interpreted :version "1.1"
    71            :components
    72            ((:module ansi-tests :pathname "test/lisp/ansi/" :components
    73          ((:file "package")
    74                 (:file "parse-ansi-errors" :depends-on ("package"))))))
     69(defsystem :ansi-interpreted
     70  :version "1.2"
     71  :description "Test ABCL with the interpreted ANSI tests" :components
     72  ((:module ansi-tests :pathname "test/lisp/ansi/" :components
     73            ((:file "packages")
     74             (:file "abcl-ansi" :depends-on ("packages"))
     75             (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
    7576(defmethod perform :before ((o test-op) (c (eql (find-system :ansi-interpreted))))
    7677  (load-system  :ansi-interpreted))
     78
     79(defmethod perform :after ((o load-op) (c (eql (find-system :ansi-interpreted))))
     80  (funcall (intern (symbol-name 'load-tests) :abcl.test.ansi)))
     81
    7782(defmethod perform ((o test-op) (c (eql (find-system :ansi-interpreted))))
    7883  (funcall (intern (symbol-name 'run) :abcl.test.ansi)
    7984     :compile-tests nil))
    8085
    81 ;;; Test ABCL with the compiled ANSI tests
    82 (defsystem :ansi-compiled :version "1.1"
    83            :components
     86
     87(defsystem :ansi-compiled :version "1.2"
     88           :description "Test ABCL with the compiled ANSI tests." :components
    8489           ((:module ansi-tests :pathname "test/lisp/ansi/" :components
    85          ((:file "package")
    86                 (:file "parse-ansi-errors" :depends-on ("package"))))))
     90                     ((:file "packages")
     91                      (:file "abcl-ansi" :depends-on ("packages"))
     92                      (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
     93
    8794(defmethod perform :before ((o test-op) (c (eql (find-system :ansi-compiled))))
    8895  (load-system :ansi-compiled))
     
    9198     :compile-tests t))
    9299
    93 ;;; Test ABCL with CL-BENCH
    94 (defsystem :cl-bench :components
    95           ((:module cl-bench-package :pathname "../cl-bench/"
    96                     :components ((:file "defpackage")))
    97             (:module cl-bench-wrapper :pathname "test/lisp/cl-bench/"
    98                      :depends-on (cl-bench-package) :components
    99                      ((:file "wrapper")))))
     100(defsystem :cl-bench
     101  :description "Test ABCL with CL-BENCH."
     102  :components ((:module cl-bench-package :pathname "../cl-bench/"
     103                        :components ((:file "defpackage")))
     104               (:module cl-bench-wrapper :pathname "test/lisp/cl-bench/"
     105                        :depends-on (cl-bench-package) :components
     106                        ((:file "wrapper")))))
    100107(defmethod perform :before ((o test-op) (c (eql (find-system :cl-bench))))
    101108  (load-system :cl-bench))
  • trunk/abcl/test/lisp/ansi/packages.lisp

    r13923 r13924  
    33  (:nicknames #:ansi-tests #:abcl-ansi-tests #:gcl-ansi)
    44  (:export #:run
    5      #:verify-ansi-tests
     5           #:verify-ansi-tests
    66     #:load-tests
    77     #:clean-tests
    88           #:full-report
    9      #:report #:parse))
     9     #:report #:parse)
     10  (:import-from #:rt #:do-test #:do-test #:do-tests))
    1011
    11 (in-package :abcl.test.ansi)
    1212
    13 (defparameter *ansi-tests-master-source-location*
    14   "<svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests>") 
    15 
    16 (defparameter *ansi-tests-directory*
    17   (if (find :asdf2 *features*)
    18       (asdf:system-relative-pathname :ansi-compiled "../ansi-tests/")
    19       (merge-pathnames #p"../ansi-tests/"
    20            (asdf:component-pathname
    21       (asdf:find-system :ansi-compiled)))))
    22 
    23 (defun run (&key (compile-tests nil))
    24   "Run the ANSI-TESTS suite, to be found in *ANSI-TESTS-DIRECTORY*.
    25 Possibly running the compiled version of the tests if COMPILE-TESTS is non-NIL."
    26   (verify-ansi-tests)
    27   (let* ((ansi-tests-directory
    28     *ansi-tests-directory*)
    29    (boot-file
    30     (if compile-tests "compileit.lsp" "doit.lsp"))
    31    (message
    32     (format nil "Invocation of '~A' in ~A"
    33       boot-file ansi-tests-directory)))
    34     (progv
    35   '(*default-pathname-defaults*)
    36   `(,(merge-pathnames *ansi-tests-directory*
    37           *default-pathname-defaults*))
    38     (format t "--->  ~A begins.~%" message)
    39     (format t "Invoking ABCL hosted on ~A ~A.~%"
    40       (software-type) (software-version))
    41     (time (load boot-file))
    42     (format t "<--- ~A ends.~%" message))))
    43 
    44 (defun verify-ansi-tests ()
    45   (unless
    46       (probe-file *ansi-tests-directory*)
    47     (error 'file-error
    48      "Failed to find the GCL ANSI tests in '~A'. Please
    49 locally obtain ~A, and set the value of *ANSI-TESTS-DIRECTORY* to that
    50 location." 
    51        *ansi-tests-directory*
    52        *ansi-tests-master-source-location*)))
    53 
    54 (defvar *ansi-tests-loaded-p* nil)
    55 (defun load-tests ()
    56   "Load the ANSI tests but do not execute them."
    57   (verify-ansi-tests)
    58   (let ((*default-pathname-defaults* *ansi-tests-directory*)
    59   (package *package*))
    60     (setf *package* (find-package :cl-user))
    61     (load "gclload1.lsp")
    62     (load "gclload2.lsp")
    63     (setf *package* package))
    64   (setf *ansi-tests-loaded-p* t))
    65  
    66 (defun clean-tests ()
    67   "Do what 'make clean' would do from the GCL ANSI tests,"
    68   ;; so we don't have to hunt for 'make' in the PATH on win32.
    69   (verify-ansi-tests)
    70 
    71   (mapcar #'delete-file
    72     (append (directory (format nil "~A/*.cls" *ansi-tests-directory*))
    73       (directory (format nil "~A/*.abcl" *ansi-tests-directory*))
    74       (directory (format nil "~A/scratch/*" *ansi-tests-directory*))
    75       (mapcar (lambda(x)
    76           (format nil "~A/~A" *ansi-tests-directory* x))
    77         '("scratch/"
    78           "scratch.txt" "foo.txt" "foo.lsp"
    79           "foo.dat"
    80           "tmp.txt" "tmp.dat" "tmp2.dat"
    81           "temp.dat" "out.class"
    82           "file-that-was-renamed.txt"
    83           "compile-file-test-lp.lsp"
    84           "compile-file-test-lp.out"
    85           "ldtest.lsp")))))
    8613
    8714       
Note: See TracChangeset for help on using the changeset viewer.