source: branches/0.20.x/abcl/test/lisp/ansi/package.lisp

Last change on this file was 12618, checked in by Mark Evenson, 15 years ago

Incorporate an ASDF2 snapshot as the base ASDF.

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1(defpackage :abcl.test.ansi
2  (:use :cl :asdf)
3  (:nicknames "ansi-tests" "abcl-ansi-tests" "gcl-ansi")
4  (:export :run :report :parse))
5
6(in-package :abcl.test.ansi)
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  (if (find :asdf2 *features*)
13      (asdf:system-relative-pathname 
14       :ansi-compiled "../ansi-tests/")
15      (merge-pathnames
16       #p"../ansi-tests/"
17       (asdf:component-pathname (asdf:find-system :ansi-compiled)))))
18
19(defun run (&key (compile-tests nil)) 
20  "Run the ANSI-TESTS suite, to be found in *ANSI-TESTS-DIRECTORY*.
21Possibly running the compiled version of the tests if COMPILE-TESTS is non-NIL."
22  (let* ((ansi-tests-directory 
23    *ansi-tests-directory*)
24   (boot-file 
25    (if compile-tests "compileit.lsp" "doit.lsp"))
26   (message 
27    (format nil "Invocation of '~A' in ~A" boot-file ansi-tests-directory)))
28    (handler-case 
29  (progv 
30      '(*default-pathname-defaults*) 
31      `(,(merge-pathnames *ansi-tests-directory* *default-pathname-defaults*))
32    (format t "--->  ~A begins.~%" message)
33    (format t "Invoking ABCL hosted on ~A ~A.~%" 
34      (software-type) (software-version))
35    (if (find :unix *features*)
36        (run-shell-command "cd ~A; make clean" ansi-tests-directory)
37        ;; XXX -- what to invoke on win32?  Untested:
38        (run-shell-command 
39         (format nil "~A~%~A"
40           (format nil "cd ~A" *ansi-tests-directory*)
41           (format nil "erase *.cls *.abcl"))))
42    (time (load boot-file))
43    (format t "<--- ~A ends.~%" message))
44      (file-error (e)
45    (error 
46     (format nil
47       "Failed to find the GCL ANSI tests in '~A'.
48Because ~A.
49To resolve, please locally obtain ~A,
50and set the value of *ANSI-TESTS-DIRECTORY* to that location."
51     ansi-tests-directory e 
52     *ansi-tests-master-source-location*))))))
53
54       
55       
56
Note: See TracBrowser for help on using the repository browser.