test-asdf.asd 3.31 KB
Newer Older
1
(defpackage :test-asdf-system
2
  (:use :cl :asdf :uiop))
3 4
(in-package :test-asdf-system)

5 6
(defvar *times-loaded* 0)
(incf *times-loaded*)
7
;;(format! t "Times that test-asdf.asd was loaded: ~D~%" *times-loaded*)
8

9
(defsystem :test-asdf :class package-inferred-system)
10 11 12

(defsystem :test-asdf/all
  :version "0"
13 14
  :depends-on ((:version :test-asdf/2 "2")
               :test-asdf/4))
15

16
(defsystem :test-asdf/1
17 18
  :components ((:file "file1" :if-feature :common-lisp)
               (:file "does-not-exist" :if-feature (:not :common-lisp))))
19

20
(defsystem :test-asdf/2
21
  :version "2.2"
22
  :depends-on (:test-asdf/1)
23 24 25 26
  :components ((:module "foo" :pathname ""
                :components ((:module "bar" :pathname ""
                              :components ((:file "file2")))))))

27
(defsystem :test-asdf/4
28 29 30
  :components ((:file "file3")
               (:file "file4" :in-order-to ((load-op (load-op "file3"))
                                            (compile-op (load-op "file3"))))))
31

32
(defsystem :test-asdf/test9-1
33 34 35 36 37
  :version "1.1"
  :components ((:file "file2"))
  :depends-on ((:version :test-asdf/test9-2 "2.0")))

(defsystem :test-asdf/test-module-depend
38 39 40
  :depends-on
  ((:feature :sbcl (:require :sb-posix))
   (:feature :allegro (:require "osi")))
41
  :components
42 43
  ((:file "file1" :if-feature :common-lisp)
   (:file "doesnt-exist" :if-feature (:not :common-lisp))
44 45 46 47 48 49 50 51
   (:module "quux"
    :pathname ""
    :depends-on ("file1")
    :components
    ((:file "file2")
     (:module "file3mod"
      :pathname ""
      :components
52 53
      ((:file "file3" :if-feature :common-lisp)
       (:file "does-not-exist" :if-feature (:not :common-lisp))))))))
54

55 56 57 58 59 60 61

(defsystem :test-asdf/test9-2
  :version "1.0"
  :components ((:file "file1")))

(defsystem :test-asdf/test9-3
  :depends-on ((:version :test-asdf/test9-2 "1.0")))
62 63 64 65 66 67

(defsystem :test-asdf/test-source-directory-1
  :pathname "some/relative/pathname/")

(defsystem :test-asdf/test-source-directory-2
  :pathname "some/relative/pathname/with-file.type")
68 69 70 71 72

(defsystem :test-asdf/bundle-1
  :components ((:file "file1") (:file "file3")))

(defsystem :test-asdf/bundle-2
Francois-Rene Rideau's avatar
Francois-Rene Rideau committed
73 74 75
  :depends-on (:test-asdf/bundle-1) :components
  ((:file "file2")
   (:file "invalid-file" :if-feature (:not :common-lisp))))
76

77 78
(defsystem :test-asdf/force
  :depends-on (:test-asdf/force1)
79
  :components ((:file "file4")))
80 81

(defsystem :test-asdf/force1
82 83 84
  ;; Importantly, this depends on a system that is NOT defined in the same file,
  ;; so that we can check that forcing causes one file to be reloaded but not the other.
  :depends-on (:file3-only)
85
  :components ((:file "file1")))
86 87 88 89

;; These are used by test-defsystem-depends-on-change.asd, test-defsystem-depends-on-change.script
(defvar *ta/dcc* 0)
(defsystem "test-asdf/dep-can-change"
90 91
  :depends-on ("test-asdf-location-change" "test-asdf/dep-forced")
  :components ((:file "show-progress"))
92 93
  :perform (load-op (o c) (incf *ta/dcc*)))

94 95 96
(defsystem "test-asdf/dep-forced"
  :components ((:file "file1")))

97 98 99 100 101 102 103 104 105
(defvar *ta/dcd* 0)
(defsystem "test-asdf/dep-can-disappear"
  :depends-on ("test-asdf-location-change")
  :perform (load-op (o c) (incf *ta/dcd*)))

(defvar *ta/dca* 0)
(defsystem "test-asdf/dep-can-appear"
  :depends-on ("test-asdf-location-change")
  :perform (load-op (o c) (incf *ta/dca*)))
106 107 108 109 110 111

(defsystem :test-asdf/upgrade
  :version "0"
  :depends-on (:test-asdf/all)
  :components ((:file "properly-upgraded")))