Commit 540b7b94 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Merge branch 'master' of gitlab.common-lisp.net:asdf/asdf

parents afc1c6da cf6c78aa
......@@ -219,8 +219,8 @@ case "$lisp" in
allegromodern8_64_s) command="${ALLEGROMODERN8_64_S:-mlisp8_64_s}" ;;
esac
# For the sake of the lisp-invocation library, re-export these
ALLEGRO=$command ; export ALLEGRO ;
echo ALLEGRO=$ALLEGRO
# ALLEGRO=$command ; export ALLEGRO ;
# echo ALLEGRO=$ALLEGRO
flags="-q"
nodebug="-batch"
if [ "$os" = windows ] && [ -z "$ALLEGRO_NOISY" ] ; then
......
......@@ -56,7 +56,7 @@
(ensure-directories-exist d)
(with-open-file (s (merge-pathnames* (format nil "foo~D.asd" i) d)
:direction :output
:if-exists :rename-and-delete
:if-exists :supersede
:if-does-not-exist :create)
(format s "(defsystem :foo~D)~%" i))))
......
......@@ -5,48 +5,51 @@
(defparameter foo :test-asdf-location-change)
(DBG "load foo. Should load from xach-foo-1/")
(setf *central-registry* (list (subpathname *test-directory* "xach-foo-1/")))
(defparameter foo1 (find-system foo))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-1/test-asdf-location-change.asd")
(system-source-file foo1))
(assert-equal (mapcar 'component-name (component-children foo1)) '("a"))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-1/a.lisp")
(component-pathname (find-component foo1 "a")))
(assert-equal nil (find-component foo1 "b"))
(load-system foo)
(defparameter loaded (find-symbol* :loaded :first-version))
(assert-equal (symbol-value loaded) t)
(with-expected-failure (#+ecl (not (asdf:version-satisfies (lisp-implementation-version) "16"))
#-ecl nil)
(DBG "load foo. Should load from xach-foo-1/")
(setf *central-registry* (list (subpathname *test-directory* "xach-foo-1/")))
(defparameter foo1 (find-system foo))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-1/test-asdf-location-change.asd")
(system-source-file foo1))
(assert-equal (mapcar 'component-name (component-children foo1)) '("a"))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-1/a.lisp")
(component-pathname (find-component foo1 "a")))
(assert-equal nil (find-component foo1 "b"))
(load-system foo)
(defparameter loaded (find-symbol* :loaded :first-version))
(assert-equal (symbol-value loaded) t)
(DBG "load foo again. Should not do anything -- already loaded")
(setf (symbol-value loaded) :test-that-we-dont-reload)
(load-system foo)
(assert-equal (symbol-value loaded) :test-that-we-dont-reload)
(assert (not (find-package :second-version)))
(DBG "load foo again. Should not do anything -- already loaded")
(setf (symbol-value loaded) :test-that-we-dont-reload)
(load-system foo)
(assert-equal (symbol-value loaded) :test-that-we-dont-reload)
(assert (not (find-package :second-version)))
(DBG "Now, change registry so foo is found from xach-foo-2/")
(setf *central-registry* (list (subpathname *test-directory* "xach-foo-2/")))
(defparameter foo2 (find-system foo))
(assert (eq foo1 foo2)) ;; the object should be the same
(assert-equal (mapcar 'component-name (component-children foo2)) '("a" "b"))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-2/test-asdf-location-change.asd")
(system-source-file foo2))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-2/a.lisp")
(component-pathname (find-component foo2 "a")))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-2/b.lisp")
(component-pathname (find-component foo2 "b")))
(DBG "load foo yet again. It should see the pathname has changed and load it anew")
;;; ECL bug: this fails if we use load-bundle-op instead of load-op as *load-system-operation*
;;; in bundle.lisp. The test-asdf-location-change.fasb is linked and loaded, but that fails to
;;; create the :second-version package; loading the same .fasb in another ecl works fine, and
;;; defines (second-version:wtf). WTF? You can test this bug by uncommenting the
;;; (setf asdf::*load-system-operation* 'load-bundle-op) line at the beginning of this file.
;;; NB: works on MKCL.
(load-system foo)
(assert (symbol-value (find-symbol* :loaded :second-version)))
(assert-equal 42 (symbol-call :second-version :wtf))
(DBG "Now, change registry so foo is found from xach-foo-2/")
(setf *central-registry* (list (subpathname *test-directory* "xach-foo-2/")))
(defparameter foo2 (find-system foo))
(assert (eq foo1 foo2)) ;; the object should be the same
(assert-equal (mapcar 'component-name (component-children foo2)) '("a" "b"))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-2/test-asdf-location-change.asd")
(system-source-file foo2))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-2/a.lisp")
(component-pathname (find-component foo2 "a")))
(assert-pathname-equal
(subpathname *test-directory* "xach-foo-2/b.lisp")
(component-pathname (find-component foo2 "b")))
(DBG "load foo yet again. It should see the pathname has changed and load it anew")
;;; ECL bug: this fails if we use load-bundle-op instead of load-op as *load-system-operation*
;;; in bundle.lisp. The test-asdf-location-change.fasb is linked and loaded, but that fails to
;;; create the :second-version package; loading the same .fasb in another ecl works fine, and
;;; defines (second-version:wtf). WTF? You can test this bug by uncommenting the
;;; (setf asdf::*load-system-operation* 'load-bundle-op) line at the beginning of this file.
;;; NB: works on MKCL.
(load-system foo)
(assert (symbol-value (find-symbol* :loaded :second-version)))
(assert-equal 42 (symbol-call :second-version :wtf))
)
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