1;;; -*- Lisp -*- 2 3;;;--------------------------------------------------------------------------- 4;;; This is supposed to verify that if a lisp file is lost, then any attempt to 5;;; make the system will fail. I.e., we verify that we won't just load a stale 6;;; fasl when the source file is lost. 7;;;--------------------------------------------------------------------------- 8 9 10 11 12 13(def-test-system test-missing-lisp-file 14 :components ((:file "file2" :in-order-to ((compile-op (load-op "fileMissing")) 15 (load-op (load-op "fileMissing")))) 16 (:file "fileMissing"))) 17 18(defparameter missing-name (test-source "fileMissing.lisp")) 19(defparameter template-file (test-source "file1.lisp")) 20(concatenate-files (list template-file) missing-name) 21(unless (probe-file missing-name) 22 (format t "File copy failed.~%")) 23 24(asdf:operate 'asdf:load-op 'test-missing-lisp-file) 25;; test that it compiled 26 27(defparameter file1 (test-fasl "file2")) 28(defparameter file2 (test-fasl "fileMissing")) 29(defparameter file1-date (file-write-date file1)) 30 31(assert file1-date) 32(assert (file-write-date file2)) 33 34;; and loaded 35(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package))) 36 37;; now remove the lisp file we created, and wait for an error 38 39(delete-file-if-exists missing-name) 40;; we shouldn't be able to find the input-file for the compile-op, and that 41;; should be an error. 42(assert (nth-value 1 (ignore-errors (asdf:operate 'asdf:load-op 'test-missing-lisp-file)))) 43