source: trunk/abcl/test/lisp/ansi/package.lisp @ 11530

Last change on this file since 11530 was 11530, checked in by Mark Evenson, 13 years ago

'abcl.test' now invokes both Java and Lisp based tests.

First stab at a collected test infrastructure for ABCL using ASDF packaging.

Currently, only the GCL ANSI-TEST suite really works: create a sibling
directory to the 'abcl' top-level directory called 'ansi-tests' to get
them to run automagically.

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1(defpackage :abcl.tests.ansi-tests
2  (:use :cl :asdf)
3  (:nicknames "ansi-tests" "abcl-ansi-tests")
4  (:export :run))
5
6(in-package :abcl.tests.ansi-tests)
7
8(defparameter *ansi-tests-master-source-location*
9  "<svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests>") 
10
11(defparameter *ansi-tests-directory*
12  (merge-pathnames
13   #p"../ansi-tests/"
14   (asdf:component-pathname (asdf:find-system :abcl))))
15
16(defun run (&optional (compile-tests nil)) 
17  "Run the ANSI-TESTS suite, found in *ANSI-TESTS-DIRECTORY*.
18Possibly 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    (handler-case 
23  (progn
24    (setf  *default-pathname-defaults*
25     (merge-pathnames ansi-tests-directory 
26          *default-pathname-defaults*))
27    (warn 
28     (format nil "Speculative invocation of '~A' in ~A follows."
29       boot-file
30       ansi-tests-directory))
31;; XXX -- what to invoke on win32?
32;;    (run-shell-command "make clean" :directory ansi-tests-directory)
33    (time (load boot-file)))
34      (file-error (e)
35    (error 
36     (format nil
37       "Failed to find the GCL ANSI tests in '~A'.
38Because ~A.
39To resolve, please locally obtain ~A,
40and set the value of *ANSI-TESTS-DIRECTORY* to that location."
41     ansi-tests-directory e 
42     *ansi-tests-master-source-location*))))
43    (setf *default-pathname-defaults*
44    original-pathname-defaults)))
45       
46       
47
Note: See TracBrowser for help on using the repository browser.