test-redundant-recompile.script 1.29 KB
Newer Older
1
;;; -*- Lisp -*-
2 3 4 5
#|
;;;This test system definition attempts to replicate the excess dependencies
;;;that seem to give rise to launchpad bug 590517
;;;(https://bugs.launchpad.net/asdf/+bug/590517)
6

7 8
1) from clean, check that all fasl files build and that some function
   defined in the second file is present
9

10 11 12 13 14 15 16 17 18 19
2) load again.  Check to make sure that nothing is recompiled.
|#

(def-test-system test-redundant-recompile
  :components ((:file "file2" :in-order-to ((compile-op (load-op "file1"))
                                            (load-op (load-op "file1"))))
               (:file "file1")))


(load-system 'test-redundant-recompile)
20 21 22 23 24
;; test that it compiled
(defparameter file1 (test-fasl "file1"))
(defparameter file2 (test-fasl "file2"))
(defparameter file1-date (file-write-date file1))
(defparameter file2-date (file-write-date file2))
25

26 27 28 29
(format t "~&test-redundant-recompile 1: ~S ~S~%" file1 file1-date)
(format t "~&test-redundant-recompile 2: ~S ~S~%" file2 file2-date)
(assert file1-date)
(assert file2-date)
30

31 32
;; and loaded
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
33

34 35
;; now rerun the load-op and check that no files are recompiled
(load-system 'test-redundant-recompile)
36 37
(assert-equal file1-date (file-write-date file1))
(assert-equal file2-date (file-write-date file2))