test-module-depend.script 1.41 KB
Newer Older
1
;;; -*- Lisp -*-
2

3
(load-system 'test-module-depend)
4

5
;; test that it compiled
6
(defparameter file1.lisp (component-pathname (find-component 'test-module-depend "file1")))
7 8 9
(defparameter file1.fasl (first (output-files 'compile-op '(test-module-depend "file1"))))
(defparameter file2.fasl (first (output-files 'compile-op '(test-module-depend "quux" "file2"))))
(defparameter file3.fasl (first (output-files 'compile-op '(test-module-depend "quux" "file3mod" "file3"))))
10 11
(defparameter file1-date (get-file-stamp file1.fasl))
(defparameter file3-date (get-file-stamp file3.fasl))
12 13 14
(assert-pathname-equal file1.fasl (test-fasl "file1"))
(assert-pathname-equal file2.fasl (test-fasl "file2"))
(assert-pathname-equal file3.fasl (test-fasl "file3"))
15

16 17
(assert file1-date)
(assert file3-date)
18

19
;; and loaded
20
(assert (asymval '#:*file1* :test-package))
21

22 23 24
;; now touch file1 and its fasl so the fasl is out of date,
;; and check that file2 _is_ also recompiled
;; this didn't work before the cross-module (intra-system) dependency bug was fixed.
25

26
(touch-file file1.lisp :timestamp (- file3-date 60))
27 28 29
(touch-file file1.fasl :timestamp (- file3-date 90))
(touch-file file2.fasl :timestamp (- file3-date 30))
(touch-file file3.fasl :timestamp (- file3-date 15))
30
(load-system 'test-module-depend)
31
(assert-compare (>= (get-file-stamp file2.fasl) file3-date))
32
;; does this properly go to the second level?
33
(assert-compare (>= (get-file-stamp file3.fasl) file3-date))