/usr/share/doc/cl-asdf/examples/test1.script is in cl-asdf 2:2.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ;;; -*- Lisp -*-
(load "script-support.lisp")
(load-asdf)
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:load-system 'test1)
;; 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
(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)))
;; filesystem mtime has 1 second granularity. Make sure even fast machines see a difference.
(sleep 1)
(asdf::run-shell-command "touch file1.lisp")
(asdf:operate 'asdf:load-op 'test1)
(assert (> (file-write-date file2) before)))))
|