Newer
Older
(load "script-support")
Francois-Rene Rideau
committed
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(format t "blah ~S~%" asdf:*central-registry*)
(describe (asdf:find-system 'test1))
(trace asdf:operate asdf:perform asdf::merge-component-relative-pathname
asdf:component-name asdf:component-pathname)
(asdf:operate 'asdf:load-op 'test1)
(format t "blah~%")
;; test that it compiled
(let* ((file1 (asdf:compile-file-pathname* "file1"))
(file2 (asdf:compile-file-pathname* "file2"))
(file1-date (file-write-date file1)))
(format t "~&test1 1: ~S ~S~%" file1 file1-date)
(assert file1-date)
(assert (file-write-date file2))
;; and loaded
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
;; now remove one output file and check that the other is _not_
;; recompiled
(sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
(asdf::run-shell-command "rm -f ~A" (namestring file2))
(asdf:operate 'asdf:load-op 'test1)
(assert (= file1-date (file-write-date file1)))
(assert (file-write-date file2))
;; now touch file1 and check that file2 _is_ also recompiled
;; XXX run-shell-command loses if *default-pathname-defaults* is not the
;; unix cwd. this is not a problem for run-tests.sh, but can be in general
(let ((before (file-write-date file2)))
(asdf::run-shell-command "touch file1.lisp")
(sleep 1)
(asdf:operate 'asdf:load-op 'test1)
(assert (> (file-write-date file2) before)))))