-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest-defsystem-depends-on.script
60 lines (45 loc) · 2.05 KB
/
test-defsystem-depends-on.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
;;-*- Lisp -*-
(in-package :asdf-test)
(def-test-system test-defsystem-depends-on-1
:defsystem-depends-on (test-asdf/l-file)
:default-component-class "l-file:cl-source-file.l"
:components
((:cl-source-file.l "file1" :type "lisp")
(:cl-source-file "file2" :depends-on ("file1"))
(:file "test-extension")))
(load-system :test-defsystem-depends-on-1)
(def-test-system test-defsystem-depends-on-2
:defsystem-depends-on (test-asdf/l-operation)
:build-operation "l-operation:op"
:components
((:file "file3")))
(assert-equal 0 l-operation:*x*)
(reset-session)
(make :test-defsystem-depends-on-2)
(assert-equal 2 l-operation:*x*) ;; perform called twice, on file and on system.
(def-test-system test-defsystem-depends-on-3
:defsystem-depends-on (test-asdf/l-operation)
:build-operation "does-not-exist"
:components ((:file "file3")))
(reset-session)
(signals asdf::formatted-system-definition-error
(handler-bind ((system-out-of-date 'continue)) (make :test-defsystem-depends-on-3)))
(defparameter *newsym* (gentemp (symbol-name 'feature) :keyword))
(reset-session)
;;; FIXME: the following form triggers bug https://bugs.launchpad.net/asdf/+bug/1445638
(eval `(def-test-system test-defsystem-depends-on-4
:defsystem-depends-on ((:feature ,*newsym* "test-defsystem-depends-on-3"))))
(assert (find-system "test-defsystem-depends-on-4"))
(progn
(reset-session)
(signals missing-dependency (def-test-system unloadable-system
:defsystem-depends-on (nonexistent-system)))
(assert (not (registered-system "unloadable-system"))))
(progn
(signals missing-dependency
(handler-bind ((system-out-of-date 'continue)) (find-system "test-defsystem-depends-on-missing-system")))
(assert (not (asdf::registered-system "test-defsystem-depends-on-missing-system"))))
(progn
(signals asdf::system-definition-error
(handler-bind ((system-out-of-date 'continue)) (find-system "test-defsystem-depends-on-circular")))
(assert (not (asdf::registered-system "test-defsystem-depends-on-circular"))))