Commit 748ccf15 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Add a test for the bundle functionality. Remove long obsolete test5.

parent 9b8fc232
;;; -*- Lisp -*-
(load "script-support.lisp")
(load-asdf)
;;;---------------------------------------------------------------------------
;;; Check to see if the bundle functionality is doing something.
;;;---------------------------------------------------------------------------
(quit-on-error
(asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(asdf:defsystem :test-bundle-1 :components ((:file "file1") (:file "file3")))
(asdf:defsystem :test-bundle-2 :depends-on (:test-bundle-1) :components ((:file "file2")))
(let* ((op (make-instance 'asdf::fasl-op))
(bundle-1 (asdf:output-file op (find-system :test-bundle-1)))
(bundle-2 (asdf:output-file op (find-system :test-bundle-2))))
(DBG :test-bundle bundle-1 bundle-2)
(asdf::delete-file-if-exists bundle-1)
(asdf::delete-file-if-exists bundle-2)
(asdf:operate 'asdf:load-fasl-op :test-bundle-2)
;; Check that the bundles were indeed created.
(assert (probe-file bundle-1))
(assert (probe-file bundle-2))
;; Check that the files were indeed loaded.
(assert (symbol-value (asdf::find-symbol* :*file1* :test-package)))
(assert (symbol-value (asdf::find-symbol* :*file3* :test-package)))))
;;; -*- Lisp -*-
(asdf:defsystem test5
:components
((:module "deps"
:pathname "."
:components
((:file "file1")
(:file "file2" :load-only-p t)))))
;;; -*- Lisp -*-
;;; test :load-only-p support
(load "script-support")
(load "../asdf")
(exit-on-error
(asdf:run-shell-command "rm ~A ~A"
(namestring (compile-file-pathname "file1"))
(namestring (compile-file-pathname "file2")))
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:oos 'asdf:load-op 'test5)
(assert (probe-file (compile-file-pathname "file1")))
(assert (not (probe-file (compile-file-pathname "file2"))))
)
\ No newline at end of file
Supports Markdown
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