2.019.6: Added test for successful loading of weakly-depended-on system. 2.019.6
authorRobert P. Goldman <rpgoldman@real-time.com>
Wed, 14 Dec 2011 20:04:21 +0000 (14:04 -0600)
committerRobert P. Goldman <rpgoldman@real-time.com>
Wed, 14 Dec 2011 20:34:24 +0000 (14:34 -0600)
asdf.asd
asdf.lisp
test/test-weakly-depends-on-present.asd [new file with mode: 0644]
test/test-weakly-depends-on-present.script [new file with mode: 0644]
test/test-weakly-depends-on-unpresent.asd [moved from test/test-weakly-depends-on.asd with 70% similarity]
test/test-weakly-depends-on-unpresent.script [moved from test/test-weakly-depends-on.script with 50% similarity]

index 94552ac..20e89a0 100644 (file)
--- a/asdf.asd
+++ b/asdf.asd
@@ -14,7 +14,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.019.5" ;; to be automatically updated by bin/bump-revision
+  :version "2.019.6" ;; to be automatically updated by bin/bump-revision
   :depends-on ()
   :components
   ((:file "asdf")
index c84e59e..c8aaab4 100644 (file)
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -1,5 +1,5 @@
 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
-;;; This is ASDF 2.019.5: Another System Definition Facility.
+;;; This is ASDF 2.019.6: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
          ;; "2.345.6" would be a development version in the official upstream
          ;; "2.345.0.7" would be your seventh local modification of official release 2.345
          ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
-         (asdf-version "2.019.5")
+         (asdf-version "2.019.6")
          (existing-asdf (find-class 'component nil))
          (existing-version *asdf-version*)
          (already-there (equal asdf-version existing-version)))
diff --git a/test/test-weakly-depends-on-present.asd b/test/test-weakly-depends-on-present.asd
new file mode 100644 (file)
index 0000000..e88132f
--- /dev/null
@@ -0,0 +1,5 @@
+(defsystem test-weakly-depends-on-present
+  :weakly-depends-on (file3-only)
+  :if-component-dep-fails :ignore
+  :components ((:file "file1")))
+
diff --git a/test/test-weakly-depends-on-present.script b/test/test-weakly-depends-on-present.script
new file mode 100644 (file)
index 0000000..b55c386
--- /dev/null
@@ -0,0 +1,31 @@
+;;; -*- Lisp -*-
+(load "script-support.lisp")
+(load-asdf)
+
+;;;---------------------------------------------------------------------------
+;;; Check to see if a weakly-depended-on system, which is present in the
+;;; directory, actually gets loaded.
+;;;---------------------------------------------------------------------------
+
+
+(quit-on-error
+ (setf asdf:*central-registry* '(*default-pathname-defaults*))
+ (asdf:load-system 'test-weakly-depends-on-present)
+ ;; The weakly-depended-on system, file3-only, should be loaded...
+ (let* ((file3 (asdf:compile-file-pathname* "file3"))
+        (file3-date (file-write-date file3)))
+
+   ;; (format t "~&test1 1: ~S ~S~%" file1 file1-date)
+   (assert file3-date)
+   ;; and loaded
+   (assert (symbol-value (find-symbol (symbol-name :*file3*) :test-package)))))
+
+ ;; The depending system (test-weakly-depends-on-present) loads
+ ;; successfully. [2011/12/14:rpg]
+ (let* ((file1 (asdf:compile-file-pathname* "file1"))
+        (file1-date (file-write-date file1)))
+
+   ;; (format t "~&test1 1: ~S ~S~%" file1 file1-date)
+   (assert file1-date)
+   ;; and loaded
+   (assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))))
similarity index 70%
rename from test/test-weakly-depends-on.asd
rename to test/test-weakly-depends-on-unpresent.asd
index e5ebf0d..ed33034 100644 (file)
@@ -1,4 +1,4 @@
-(defsystem test-weakly-depends-on
+(defsystem test-weakly-depends-on-unpresent
   :weakly-depends-on (does-not-exist)
   :if-component-dep-fails :ignore
   :components ((:file "file1")))
similarity index 50%
rename from test/test-weakly-depends-on.script
rename to test/test-weakly-depends-on-unpresent.script
index 5ccab69..1bebe63 100644 (file)
@@ -1,10 +1,17 @@
 ;;; -*- Lisp -*-
+
+;;;---------------------------------------------------------------------------
+;;; This test verifies that if you have a system with a weakly-depends-on
+;;; dependency, and the weakly-depended-on system is NOT THERE, the depending
+;;; system will still load successfully. [2011/12/14:rpg]
+;;;---------------------------------------------------------------------------
+
 (load "script-support.lisp")
 (load-asdf)
 
 (quit-on-error
  (setf asdf:*central-registry* '(*default-pathname-defaults*))
- (asdf:load-system 'test-weakly-depends-on)
+ (asdf:load-system 'test-weakly-depends-on-unpresent)
  ;; test that it compiled
  (let* ((file1 (asdf:compile-file-pathname* "file1"))
         (file1-date (file-write-date file1)))