test-sysdef-asdf.script 1.22 KB
Newer Older
1
;;; -*- Lisp -*-
2

3
4
5
(initialize-source-registry
 '(:source-registry :ignore-inherited-configuration))
(load-system :asdf)
6

7
(initialize-source-registry
8
9
 `(:source-registry
   (:directory ,*asdf-directory*)
10
   (:directory ,*uiop-directory*)
11
   :ignore-inherited-configuration))
12
(load-system :asdf)
13
14
15

(defun system-lisp-files (system)
  (loop :for f :in (required-components system :keep-component 'cl-source-file)
16
        :collect (namestring (enough-pathname (component-pathname f) *asdf-directory*))))
17
18
19

(defun makefile-lisp-files (target)
  (remove-if 'emptyp
20
             (split-string ;; NB: assumes GNU make
21
22
23
24
              (run-program `("make" "--quiet" "--no-print-directory" ,target)
                           :output :string :error-output t :directory *asdf-directory*)
              :separator #(#\space #\newline #\return #\tab))))

25
26
#+clisp (trace run-program reduce/strcat)

27
28
29
30
31
32
33
34
(defmacro compare-files (system target)
  `(assert-equal (system-lisp-files ,system) (makefile-lisp-files ,target)))

(DBG "Testing that the Makefile and ASDF agree on the order of UIOP files")
(compare-files :uiop "driver-files")

(DBG "Testing that the Makefile and ASDF agree on the order of ASDF/DEFSYSTEM files")
(compare-files :asdf/defsystem "defsystem-files")