3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
12 (defpackage :sb-introspect-system
15 (in-package :sb-introspect-system)
17 (defsystem :sb-introspect
18 :components ((:file "introspect")))
20 (defmethod perform :after ((o load-op) (c (eql (find-system :sb-introspect))))
21 (provide 'sb-introspect))
23 (defmethod perform ((o test-op) (c (eql (find-system :sb-introspect))))
24 (operate 'load-op :sb-introspect-tests)
25 (operate 'test-op :sb-introspect-tests))
27 (defclass plist-file (cl-source-file)
30 :initarg :source-plist
31 :reader plist-file-source-plist)))
33 (defmethod perform ((op compile-op) (com plist-file))
34 (with-compilation-unit (:source-plist (plist-file-source-plist com))
37 (defmethod perform ((op load-op) (com plist-file))
38 (with-compilation-unit (:source-plist (plist-file-source-plist com))
41 (defclass source-only-file (cl-source-file)
44 (defmethod perform ((op compile-op) (com source-only-file)))
46 (defmethod output-files ((op compile-op) (com source-only-file))
47 (list (component-pathname com)))
49 (defsystem :sb-introspect-tests
50 :depends-on (:sb-introspect :sb-rt)
51 :components ((:file "xref-test-data")
52 (:file "xref-test" :depends-on ("xref-test-data"))
53 (:plist-file "test" :source-plist (:test-outer "OUT"))
54 (:source-only-file "load-test")
55 (:file "test-driver" :depends-on ("test" "load-test"))))
57 (defmethod perform ((op test-op) (com (eql (find-system :sb-introspect-tests))))
58 ;; N.b. At least DEFINITION-SOURCE-PLIST.1 assumes that CWD is the
59 ;; contrib/sb-introspect directory which is true for when this is
60 ;; implicitly run via make-target-contribs.sh -- but not when this
61 ;; is executed manually.
62 (let ((*default-pathname-defaults*
63 (make-pathname :directory (pathname-directory
64 '#.(or *compile-file-pathname*
66 (or (funcall (intern "DO-TESTS" (find-package "SB-RT")))
67 (error "~S failed" 'test-op))))