Changeset 13924 for trunk/abcl/test/lisp/ansi/packages.lisp
- Timestamp:
- 05/04/12 09:14:24 (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/test/lisp/ansi/packages.lisp
r13923 r13924 3 3 (:nicknames #:ansi-tests #:abcl-ansi-tests #:gcl-ansi) 4 4 (:export #:run 5 5 #:verify-ansi-tests 6 6 #:load-tests 7 7 #:clean-tests 8 8 #:full-report 9 #:report #:parse)) 9 #:report #:parse) 10 (:import-from #:rt #:do-test #:do-test #:do-tests)) 10 11 11 (in-package :abcl.test.ansi)12 12 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-pathname21 (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-directory28 *ansi-tests-directory*)29 (boot-file30 (if compile-tests "compileit.lsp" "doit.lsp"))31 (message32 (format nil "Invocation of '~A' in ~A"33 boot-file ansi-tests-directory)))34 (progv35 '(*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 (unless46 (probe-file *ansi-tests-directory*)47 (error 'file-error48 "Failed to find the GCL ANSI tests in '~A'. Please49 locally obtain ~A, and set the value of *ANSI-TESTS-DIRECTORY* to that50 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-file72 (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")))))86 13 87 14
Note: See TracChangeset
for help on using the changeset viewer.