test-redundant-recompile.script 922 Bytes
Newer Older
1
;;; -*- Lisp -*-
2
(load "script-support.lisp")
3 4
(load-asdf)

5
(with-test ()
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 (asdf:operate 'asdf:load-op 'test-redundant-recompile)
 ;; test that it compiled
 (let* ((file1 (asdf:compile-file-pathname* "file1"))
        (file2 (asdf:compile-file-pathname* "file2"))
        (file1-date (file-write-date file1))
        (file2-date (file-write-date file2)))

   (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)

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

   ;; now rerun the load-op and check that no files are recompiled

   ;;(trace asdf::operation-done-p asdf::traverse)
   (asdf:operate 'asdf:load-op 'test-redundant-recompile)
   (assert (= file1-date (file-write-date file1)))
   (assert (= file2-date (file-write-date file2)))))