From 4711ad4500277ddd5da281ae50ec61bab0847c84 Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" <rpgoldman@real-time.com> Date: Tue, 8 Jun 2010 22:38:12 -0500 Subject: [PATCH] Added test attempting to validate bug 590517. Added a test in which the system (test-redundant-recompile) is intended to have :in-order-to values that echo the ones reported to cause redundant recompilation in bug 590517. I have still been unable to replicate this phenomenon, however. --- test/test-redundant-recompile.asd | 16 ++++++++++++++++ test/test-redundant-recompile.script | 28 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 test/test-redundant-recompile.asd create mode 100644 test/test-redundant-recompile.script diff --git a/test/test-redundant-recompile.asd b/test/test-redundant-recompile.asd new file mode 100644 index 00000000..a69d558c --- /dev/null +++ b/test/test-redundant-recompile.asd @@ -0,0 +1,16 @@ +;;; -*- Lisp -*- +(asdf:defsystem test-redundant-recompile + :components ((:file "file2" :in-order-to ((compile-op (load-op "file1")) + (load-op (load-op "file1")))) + (:file "file1"))) + +#| +;;;This test system definition attempts to replicate the excess dependencies +;;;that seem to give rise to launchpad bug 590517 +;;;(https://bugs.launchpad.net/asdf/+bug/590517) + +1) from clean, check that all fasl files build and that some function + defined in the second file is present + +2) load again. Check to make sure that nothing is recompiled. +|# diff --git a/test/test-redundant-recompile.script b/test/test-redundant-recompile.script new file mode 100644 index 00000000..9f16fcba --- /dev/null +++ b/test/test-redundant-recompile.script @@ -0,0 +1,28 @@ +;;; -*- Lisp -*- +(load "script-support") +(load-asdf) + +(quit-on-error + (setf asdf:*central-registry* '(*default-pathname-defaults*)) + (asdf:operate 'asdf:load-op 'test-redundant-recompile) + ;; test that it compiled + (let* ((file1 (asdf:compile-file-pathname* "file1")) + (file2 (asdf:compile-file-pathname* "file2")) + (file1-date (file-write-date file1)) + (file2-date (file-write-date file2))) + + (format t "~&test-redundant-recompile 1: ~S ~S~%" file1 file1-date) + (format t "~&test-redundant-recompile 2: ~S ~S~%" file2 file2-date) + (assert file1-date) + (assert file2-date) + + ;; and loaded + (assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package))) + + ;; now rerun the load-op and check that no files are recompiled + + ;;(trace asdf::operation-done-p asdf::traverse) + (asdf:operate 'asdf:load-op 'test-redundant-recompile) + (assert (= file1-date (file-write-date file1))) + (assert (= file2-date (file-write-date file2))))) + -- GitLab