Commit 79638a7d authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Add test for systems used in multiple phases

Add test-defsystem-depends-on-phase-overlap.script (currently failing) to check
that an action present in multiple phases will only be performed once.
parent 206c1248
;;-*- Lisp -*-
(in-package :asdf-test)
(setf *central-registry* nil)
(defparameter *od* 0)
(def-test-system "overlapping-dependency"
:perform (load-op (o c) (incf *od*)))
(defparameter *dd* 0)
(def-test-system "defsystem-dependency"
:depends-on ("overlapping-dependency")
:perform (load-op (o c) (incf *dd*)))
(defparameter *id* 0)
(def-test-system "intermediate-dependency"
:defsystem-depends-on ("defsystem-dependency")
:perform (load-op (o c) (incf *id*)))
(defparameter *ms* 0)
(def-test-system "main-system"
:depends-on ("overlapping-dependency" "intermediate-dependency")
:perform (load-op (o c) (incf *ms*)))
(DBG "Load it once")
(load-system "main-system")
(assert-equal (list *od* *dd* *id* *ms*) '(1 1 1 1))
(DBG "Load it a second time, forcing od")
(load-system "main-system" :force '("overlapping-dependency"))
(assert-equal (list *od* *dd* *id* *ms*) '(2 2 2 2))
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