Commit 64b4399e authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Make a test more robust (hopefully)

parent cfd78a31
......@@ -3,11 +3,12 @@
(load-system 'test-module-depend)
;; test that it compiled
(defparameter file1.lisp (component-pathname (find-component 'test-module-depend "file1")))
(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"))))
(defparameter file1-date (file-write-date file1.fasl))
(defparameter file3-date (file-write-date file3.fasl))
(defparameter file1-date (get-file-stamp file1.fasl))
(defparameter file3-date (get-file-stamp file3.fasl))
(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,17 +16,17 @@
(assert (and file1-date file3-date))
;; and loaded
(assert (eval (intern (symbol-name '#:*file1*) :test-package)))
(assert (asymval '#:*file1* :test-package))
;; 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.
(touch-file "file1.lisp" :timestamp (- file3-date 60))
(touch-file file1.lisp :timestamp (- file3-date 60))
(touch-file file1.fasl :timestamp (- file3-date 90))
(touch-file file2.fasl :timestamp (- file3-date 30))
(touch-file file3.fasl :timestamp (- file3-date 15))
(asdf:operate 'asdf:load-op 'test-module-depend)
(assert (>= (file-write-date file2.fasl) file3-date))
(load-system 'test-module-depend)
(assert (>= (get-file-stamp file2.fasl) file3-date))
;; does this properly go to the second level?
(assert (>= (file-write-date file3.fasl) file3-date))
(assert (>= (get-file-stamp file3.fasl) file3-date))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment