Commit 4fd7c135 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Putative test for module dependencies.

This test checks to see if a file in a module will be recompiled if a file
it depends on changes.  In "classic" asdf this does not happen --- it's
launchpad bug

This is just a test for the condition.  The test fails in the current state
of ASDF.
parent a769432d
(asdf:defsystem :test-module-depend
:components ((:file "file1")
(:module "quux"
:pathname #p""
:depends-on ("file1")
:components ((:file "file2")))))
;;; -*- Lisp -*-
(load "script-support")
(load (compile-file-pathname "../asdf"))
(trace asdf:operate)
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:operate 'asdf:load-op 'test-module-depend)
;; test that it compiled
(defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
(assert (and file1-date (file-write-date (asdf:compile-file-pathname* "file2"))))
;; and loaded
(assert test-package::*file1*)
;; now touch file1 and check that file2 _is_ also recompiled
;; this will only work if the cross-module (intra-system)
;; dependency bug is fixed.
(let ((before (file-write-date (asdf:compile-file-pathname* "file2"))))
(asdf::run-shell-command "touch file1.lisp")
(sleep 1)
(asdf:operate 'asdf:load-op 'test-module-depend)
(assert (> (file-write-date (asdf:compile-file-pathname* "file2")) before))))
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