Changeset 11599


Ignore:
Timestamp:
01/29/09 16:00:07 (12 years ago)
Author:
Mark Evenson
Message:

Use HANDLER-CASE for ANSI tests to quit invoking Lisp if an error in generated.

Further incremental work on ABCL-TEST-LISP (aka the internal ABCL
tests) necessitated by the fact that both it and the ANSI tests use
the REGRESSION-TEST framework which doesn't work well in the same Lisp
instances. Trying to repackage this correctly, but it needs more work.

Location:
trunk/abcl
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/abcl.asd

    r11596 r11599  
    11;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
    22;;; $Id$
    3 
    4 ;;;; To run:
    5 ;;;;   
    6 #|
    7 cmd$ abcl
    8 CL-USER(1): (progn (require 'asdf)
    9                    (asdf:oos 'asdf:load-op :abcl)
    10                    (asdf:oos 'asdf:test-op :ansi-test-compiled :force t))
    11 |#
    123
    134(require 'asdf)
     
    178
    189;;; Wrapper for all ABCL ASDF definitions.
    19 (defsystem :abcl
    20   :version "0.3.0")
     10(defsystem :abcl :version "0.3.0")
    2111
    2212(defmethod perform :after ((o load-op) (c (eql (find-system 'abcl))))
     
    2616(defmethod perform ((o test-op) (c (eql (find-system 'abcl))))
    2717  ;;; Additional test suite invocations would go here.
    28   (asdf:oos 'asdf:test-op :ansi-test-compiled :force t))
     18  (asdf:oos 'asdf:test-op :ansi-compiled :force t))
    2919
    3020;;; A collection of test suites for ABCL.
    3121(defsystem :test-abcl
    3222  :version "0.3"
    33   :depends-on (:ansi-test-compiled :abcl-tests))
     23  :depends-on (:ansi-compiled #+nil :abcl-tests))
    3424
    3525(defmethod perform :after ((o load-op) (c (eql (find-system 'test-abcl))))
    3626  #+nil (asdf:oos 'asdf:test-op :cl-bench :force t)
    37   #+nil (asdf:oos 'asdf:test-op :abcl-tests :force t)
    38   #+nil (asdf:oos 'asdf:test-op :ansi-test-interpreted :force t)
    39   (asdf:oos 'asdf:load-op :ansi-test-compiled :force t))
     27  (asdf:oos 'asdf:load-op :abcl-test-lisp :force t)
     28  (asdf:oos 'asdf:load-op :ansi-compiled :force t)
     29  (asdf:oos 'asdf:load-op :ansi-interpreted :force t))
    4030
    41 (defsystem :ansi-test :version "0.1" :components
     31(defsystem :ansi-test :version "1.0" :components
    4232     ;;; GCL ANSI test suite.
    4333     ((:module ansi-tests :pathname "test/lisp/ansi/" :components
    4434         ((:file "package")))))
    45 (defsystem :ansi-test-interpreted :version "0,1" :depends-on (ansi-test))
    46 (defsystem :ansi-test-compiled :version "0.1" :depends-on (ansi-test))
    4735
    48 (defsystem :abcl-tests
    49    :version "1.0"
    50    :components
    51      ((:module rt :serial t  :pathname "test/lisp/abcl/" :components
    52         ((:file "rt-package") (:file "rt") (:file "test-utilities")))
    53       (:module tests :depends-on (rt)
    54         :pathname "test/lisp/abcl/" :components
    55         ((:file "compiler-tests")
    56          (:file "condition-tests")
    57          (:file "file-system-tests")
    58  #+nil         (:file "math-tests")
    59          (:file "java-tests")
    60          (:file "misc-tests")
    61          (:file "pathname-tests")))))
    62  
    63  (defmethod perform ((o test-op) (c (eql (find-system 'abcl-tests))))
     36(defsystem :ansi-interpreted :version "1.0" :depends-on (ansi-test))
     37(defmethod perform ((o test-op) (c (eql (find-system 'ansi-interpreted))))
     38   "Invoke tests with:  (asdf:oos 'asdf:test-op :ansi-interpreted :force t)."
     39   ;;; FIXME needs ASDF:OOS to be invoked with :FORCE t
     40  (funcall (intern (symbol-name 'run) :ansi.test.ansi)
     41     :compile-tests nil))
     42
     43(defsystem :ansi-compiled :version "1.0" :depends-on (ansi-test))
     44(defmethod perform ((o test-op) (c (eql (find-system 'ansi-compiled))))
     45  "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-compiled :force t)."
     46  (funcall (intern (symbol-name 'run) :abcl.test.ansi)
     47     :compile-tests t))
     48
     49(defsystem :abcl-test-lisp :version "1.0" :components
     50     ((:module package  :pathname "test/lisp/abcl/" :components
     51         ((:file "package")))))
     52(defmethod perform ((o test-op) (c (eql (find-system 'abcl-test-lisp))))
    6453   "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-tests :force t)."
    6554   ;;; FIXME needs ASDF:OOS to be invoked with :FORCE t
    66    (funcall (intern (symbol-name 'do-tests) :test)))
     55   (funcall (intern (symbol-name 'run) :abcl.test.lisp)))
    6756 
    68 (defmethod perform ((o test-op) (c (eql (find-system 'ansi-test-interpreted))))
    69    "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-tests :force t)."
    70    ;;; FIXME needs ASDF:OOS to be invoked with :FORCE t
    71   (funcall (intern (symbol-name 'run) :abcl.tests.ansi-tests)
    72      :compile-tests nil))
    73 
    74 (defmethod perform ((o test-op) (c (eql (find-system 'ansi-test-compiled))))
    75   "Invoke tests with:  (asdf:oos 'asdf:test-op :abcl-test-compiled :force t)."
    76   (funcall (intern (symbol-name 'run) :abcl.tests.ansi-tests)
    77      :compile-tests t))
    78 
    7957;;; Build ABCL from a Lisp.
     58;;; aka the "Lisp-hosted build system"
    8059;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
    81 (defsystem :build-abcl
    82   :components
     60(defsystem :build-abcl :components
    8361     ((:module build :pathname ""  :components
    8462         ((:file "build-abcl")
  • trunk/abcl/test/lisp/abcl/compiler-tests.lisp

    r11596 r11599  
    2121(require '#:jvm)
    2222
    23 (load (merge-pathnames "test-utilities.lisp" *load-truename*))
    24 
    25 (in-package #:test)
     23(in-package #:abcl.test.lisp)
    2624
    2725(defconstant most-positive-java-long 9223372036854775807)
  • trunk/abcl/test/lisp/abcl/condition-tests.lisp

    r11596 r11599  
    1919(load (merge-pathnames "test-utilities.lisp" *load-truename*))
    2020
    21 (in-package #:test)
     21(in-package #:abcl.test.lisp)
    2222
    2323(defun filter (string)
  • trunk/abcl/test/lisp/abcl/file-system-tests.lisp

    r11596 r11599  
    2020(require '#:sb-posix)
    2121
    22 (load "test-utilities.lisp")
    23 
    24 (in-package #:test)
     22(in-package #:abcl.test.lisp)
    2523
    2624(export '(pathnames-equal-p run-shell-command copy-file make-symbolic-link
  • trunk/abcl/test/lisp/abcl/java-tests.lisp

    r11596 r11599  
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
    20 (load (merge-pathnames "test-utilities.lisp" *load-truename*))
    21 
    22 (in-package #:test)
    23 
    24 #+abcl
    25 (use-package '#:java)
     20(in-package #:abcl.test.lisp)
     21
     22;#+abcl
     23;(use-package '#:java)
    2624
    2725#+allegro
  • trunk/abcl/test/lisp/abcl/math-tests.lisp

    r11596 r11599  
    2020;;; Some of these tests are based on tests in the CLISP test suite.
    2121
    22 (load "test-utilities.lisp")
    23 
    24 (in-package #:test)
     22(in-package #:abcl.test.lisp)
    2523
    2624#+(or abcl cmu sbcl)
  • trunk/abcl/test/lisp/abcl/misc-tests.lisp

    r11596 r11599  
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
    20 (load (merge-pathnames "test-utilities.lisp" *load-truename*))
    21 
    22 (in-package #:test)
     20(in-package #:abcl.test.lisp)
    2321
    2422(deftest dotimes.1
  • trunk/abcl/test/lisp/abcl/pathname-tests.lisp

    r11596 r11599  
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
    20 (load (merge-pathnames "test-utilities.lisp" *load-truename*))
    21 
    22 (in-package #:test)
     20(in-package #:abcl.test.lisp)
    2321
    2422(defun check-physical-pathname (pathname expected-directory expected-name expected-type)
  • trunk/abcl/test/lisp/abcl/rt-package.lisp

    r11576 r11599  
    2727     ))
    2828 |#
    29  (let* ((name (symbol-name :regression-test))
     29 (let* ((name (symbol-name :abcl-regression-test))
    3030  (pkg (find-package name)))
    3131   (unless pkg (setq pkg (make-package name
    32                :nicknames (mapcar #'symbol-name '(:rtest #-lispworks :rt))
     32               :nicknames (mapcar #'symbol-name '(:abcl-rtest #-lispworks :abcl-rt))
    3333               :use '(#-wcl :cl #+wcl :lisp)
    3434               )))
  • trunk/abcl/test/lisp/abcl/rt.lisp

    r11576 r11599  
    2525;has since been modified.
    2626
    27 (in-package :regression-test)
     27(in-package :abcl-regression-test)
    2828
    2929(declaim (ftype (function (t) t) get-entry expanded-eval do-entries))
  • trunk/abcl/test/lisp/abcl/test-utilities.lisp

    r11576 r11599  
    2525(pushnew :windows *features*)
    2626
    27 (unless (member "RT" *modules* :test #'string=)
     27(unless (member "ABCL-RT" *modules* :test #'string=)
    2828  (load (merge-pathnames "rt-package.lisp" *load-truename*))
    2929  (load #+abcl (compile-file-if-needed (merge-pathnames "rt.lisp" *load-truename*))
     
    3131        ;; Allegro.
    3232        #-abcl (compile-file (merge-pathnames "rt.lisp" *load-truename*)))
    33   (provide "RT"))
     33  (provide "ABCL-RT"))
    3434
    35 (unless (find-package '#:test)
    36   (defpackage #:test (:use #:cl #:regression-test)))
    37 
    38 (in-package #:regression-test)
     35(in-package #:abcl-regression-test)
    3936
    4037(export '(signals-error))
     
    4643       (:no-error (&rest ignored) (declare (ignore ignored)) nil))))
    4744
    48 (rem-all-tests)
     45#+nil (rem-all-tests)
    4946
    50 (setf *expected-failures* nil)
     47#+nil (setf *expected-failures* nil)
  • trunk/abcl/test/lisp/ansi/ansi-tests-compiled.lisp

    r11598 r11599  
    11(require 'asdf)
    2 (asdf:oos 'asdf:load-op :abcl)
    3 (asdf:oos 'asdf:load-op :test-abcl)
    4 (asdf:oos 'asdf:load-op :ansi-abcl-compiled :force t)
    5 (asdf:oos 'asdf:test-op :ansi-test-compiled :force t)
     2(handler-case
     3    (progn
     4      (asdf:oos 'asdf:load-op :abcl :force t)
     5      (asdf:oos 'asdf:test-op :ansi-compiled :force t))
     6  (t (e) (warn "Exiting after catching ~A" e)))
    67(ext:exit)
     8 
     9     
     10
  • trunk/abcl/test/lisp/ansi/ansi-tests-interpreted.lisp

    r11598 r11599  
    11(require 'asdf)
    2 (asdf:oos 'asdf:load-op :abcl)
    3 (asdf:oos 'asdf:load-op :test-abcl)
    4 (asdf:oos 'asdf:test-op :ansi-test-interpreted :force t)
     2(handler-case
     3    (progn
     4      (asdf:oos 'asdf:load-op :abcl :force t)
     5      (asdf:oos 'asdf:test-op :ansi-interpreted :force t))
     6  (t (e) (warn "Exiting after catching ~A" e)))
    57(ext:exit)
     8 
     9     
     10
  • trunk/abcl/test/lisp/ansi/package.lisp

    r11598 r11599  
    1 (defpackage :abcl.tests.ansi-tests
     1(defpackage :abcl.test.ansi
    22  (:use :cl :asdf)
    3   (:nicknames "ansi-tests" "abcl-ansi-tests")
     3  (:nicknames "ansi-tests" "abcl-ansi-tests" "gcl-ansi")
    44  (:export :run))
    55
    6 (in-package :abcl.tests.ansi-tests)
     6(in-package :abcl.test.ansi)
    77
    88(defparameter *ansi-tests-master-source-location*
     
    1515
    1616(defun run (&key (compile-tests nil))
    17   "Run the ANSI-TESTS suite, found in *ANSI-TESTS-DIRECTORY*.
     17  "Run the ANSI-TESTS suite, to be found in *ANSI-TESTS-DIRECTORY*.
    1818Possibly running the compiled version of the tests if COMPILE-TESTS is non-NIL."
    19   (let* ((original-pathname-defaults *default-pathname-defaults*)
    20   (ansi-tests-directory *ansi-tests-directory*)
    21   (boot-file (if compile-tests "compileit.lsp" "doit.lsp"))
    22   (message (format nil "Invocation of '~A' in ~A"
    23              boot-file ansi-tests-directory)))
     19  (let* ((ansi-tests-directory
     20    *ansi-tests-directory*)
     21   (boot-file
     22    (if compile-tests "compileit.lsp" "doit.lsp"))
     23   (message
     24    (format nil "Invocation of '~A' in ~A" boot-file ansi-tests-directory)))
    2425    (handler-case
    25   (progn
    26     (setf  *default-pathname-defaults*
    27      (merge-pathnames ansi-tests-directory
    28           *default-pathname-defaults*))
     26  (progv
     27      '(*default-pathname-defaults*)
     28      `(,(merge-pathnames *ansi-tests-directory* *default-pathname-defaults*))
    2929    (format t "--->  ~A begins.~%" message)
    3030    (format t "Invoking ABCL hosted on ~A ~A.~%"
     
    3232    (if (find :unix *features*)
    3333        (run-shell-command "cd ~A; make clean" ansi-tests-directory)
    34         ;; XXX -- what to invoke on win32?  Please verify
     34        ;; XXX -- what to invoke on win32?  Untested:
    3535        (run-shell-command
    36          (format nil ("~A~%~A")
     36         (format nil "~A~%~A"
    3737           (format nil "cd ~A" *ansi-tests-directory*)
    3838           (format nil "erase *.cls *.abcl"))))
     
    4747and set the value of *ANSI-TESTS-DIRECTORY* to that location."
    4848     ansi-tests-directory e
    49      *ansi-tests-master-source-location*))))
    50     (setf *default-pathname-defaults* original-pathname-defaults)))
     49     *ansi-tests-master-source-location*))))))
     50
    5151       
    5252       
Note: See TracChangeset for help on using the changeset viewer.