Commit eed95a70 by Francois-Rene Rideau

Reproduce staging failure from cl-protobufs-tests

Add test case in test-defsystem-depends-on-phase-overlap.script for a failure observed when running (test-system "cl-protobufs"): the action (test-op "cl-protobufs") depends on (load-op "cl-protobufs"), which gets staged at level 0; it then depends on (test-op "cl-protobufs-tests") which defsystem-depends-on (load-op "cl-protobufs"), but it has already been staged, so traverse-action fails to re-stage it at higher priority for level 1, and fails to perform it before we're back to defsystem "cl-protobufs-tests".
parent 0e3bdbb2
(defsystem "defsystem-dependency"
:depends-on ("overlapping-dependency")
:components ((:file "defsystem-dependency")))
:components ((:file "defsystem-dependency"))
:in-order-to ((test-op (test-op "test-system"))))
(in-package :asdf-test)
(defvar *dd* 0)
(incf *dd*)
(format t "Loaded defsystem-dependency.lisp ~d time~(~:*~p~)~%" *dd*)
(setf (find-class 'asdf::my-cl-source-file) (find-class 'cl-source-file))
(defsystem "intermediate-dependency"
:defsystem-depends-on ("defsystem-dependency")
:components ((:file "intermediate-dependency")))
:components ((:my-cl-source-file "intermediate-dependency")))
(defsystem "test-system"
:defsystem-depends-on ("defsystem-dependency")
:components ((:my-cl-source-file "test-system"))
:perform (test-op (o c) (symbol-call :asdf-test :run-test)))
(in-package :asdf-test)
(setf *dd* 10)
(defun run-test ()
(format t "Running tests...")
;;-*- Lisp -*-
;; TODO: make it files, so that DEFINE-OP can propagate and cause reloading.
(in-package :asdf-test)
(setf *central-registry* (list (subpathname *test-directory* "defsystem-depends-on/")))
......@@ -45,3 +43,13 @@
(with-asdf-session (:override t)
(load-system "main-system" :force '("overlapping-dependency")))
(assert-equal (list *od* *dd* *id* *ms*) '(1 1 1 1))
(DBG "actions marked as needed at one level should still be planned if needed at a higher level")
(setf (find-class 'asdf::my-cl-source-file) nil)
(assert-equal *dd* 0)
(with-asdf-session (:override t)
(test-system "defsystem-dependency"))
(assert-equal *dd* 10)
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