Commit bc8e5185 authored by Gary King's avatar Gary King

Added several tests from my tree; also added 'test/graveyard' where old dead tests live

parent e7e46819
(in-package #:common-lisp-user)
(defvar *test-preferences-variable-1* :default)
;;; -*- Lisp -*-
(load "script-support")
(load "../asdf")
(exit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(in-package :asdf)
(setf asdf::*load-preference-files* t)
(asdf:oos 'asdf:load-op 'test-preferences-system-1)
(assert (eq common-lisp-user::*test-preferences-variable-1* :load))
(asdf:oos 'asdf:test-op 'test-preferences-system-1)
(assert (eq common-lisp-user::*test-preferences-variable-1* :test))
)
\ No newline at end of file
;;; -*- Lisp -*-
(in-package #:common-lisp)
(defpackage #:test-preferences-1-asdf-system
(:use #:common-lisp #:asdf))
(in-package #:asdf)
(defsystem test-preferences-system-1
:components
((:file "test-preferences-1"))
:in-order-to ((test-op (load-op test-preferences-system-1))))
(defmethod operation-done-p
((o test-op)
(c (eql (find-system 'test-preferences-system-1))))
(values nil))
(defmethod load-preferences
((system (eql (find-system 'test-preferences-system-1)))
(operation test-op))
;; the default load-preferences does nothing for anything other than a
;; basic-load-op. So, ... we hack it
(load (make-pathname
:name "test-preferences-system-test"
:type "lisp"
:defaults *default-pathname-defaults*)))
(defmethod preference-file-for-system/operation
((system (eql (find-system 'test-preferences-system-1)))
(operation load-op))
(make-pathname
:name "test-preferences-system-load"
:type "lisp"
:defaults *default-pathname-defaults*))
(in-package #:common-lisp-user)
(setf *test-preferences-variable-1* :load)
(in-package #:common-lisp-user)
(setf *test-preferences-variable-1* :test)
;;; -*- Lisp -*-
;; no preference loading by default
(load "script-support")
(load "../asdf")
(in-package #:common-lisp-user)
(defvar *test6* nil)
(exit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(defmethod asdf:preference-file-for-system/operation
((system (eql (asdf:find-system 'test1))) operation)
(merge-pathnames (make-pathname :name "test1" :type "preferences")))
(asdf:operate 'asdf:load-op 'test1)
(assert (null *test6*)))
;;; -*- Lisp -*-
;; load preferences if asdf::*load-preference-files* is true
(load "script-support")
(load "../asdf")
(in-package #:common-lisp-user)
(defvar *test6* nil)
(exit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(defmethod asdf:preference-file-for-system/operation
((system (eql (asdf:find-system 'test1))) operation)
(merge-pathnames (make-pathname :name "test1" :type "preferences")))
(setf asdf::*load-preference-files* t)
(asdf:operate 'asdf:load-op 'test1)
(assert (eq *test6* :yes)))
;;; -*- Lisp -*-
(asdf:defsystem test-modules-serial
:serial t
:components
((:module "a"
:serial t
:pathname "."
:components
((:file "file1")
(:file "file2")))
(:module "b"
:pathname "b"
:components
((:file "file3")))))
;;; -*- Lisp -*-
(asdf:defsystem test-modules
:components
((:module "a"
:pathname "."
:components
((:file "file1")))
(:module "b"
:pathname "b"
:depends-on ("a")
:components
((:file "file2")))))
(in-package #:common-lisp-user)
\ No newline at end of file
;;; -*- Mode: common-lisp; Syntax: Common-Lisp; -*-
;; copyright (c) 2006-2007 Franz Inc, Oakland, CA - All rights reserved.
;;
;; The software, data and information contained herein are proprietary
;; to, and comprise valuable trade secrets of, Franz, Inc. They are
;; given in confidence by Franz, Inc. pursuant to a written license
;; agreement, and may be stored and used only in accordance with the terms
;; of such license.
;;
;; Restricted Rights Legend
;; ------------------------
;; Use, duplication, and disclosure of the software, data and information
;; contained herein by any agency, department or entity of the U.S.
;; Government are subject to restrictions of Restricted Rights for
;; Commercial Software developed at private expense as specified in
;; DOD FAR Supplement 52.227-7013 (c) (1) (ii), as applicable.
;;
;; $Id: db-agraph-preflight.asd,v 1.1.2.1 2009/01/16 23:58:53 gwking Exp $
;; -*- mode: common-lisp -*-
(in-package #:common-lisp-user)
(defpackage #:test-nested-components.system
(:use #:common-lisp #:asdf))
(in-package #:test-nested-components.system)
(defsystem test-nested-components-a
:components
((:module "nested-components"
:pathname ""
:components ((:file "test-nested-1")))))
(defsystem test-nested-components-b
:pathname ""
:components
((:file "test-nested-1")))
(defsystem db-agraph-preflight
:components
((:module "preflight-checks"
:components ((:file "preflight")))))
(defsystem db-agraph-preflight-2
:pathname "preflight-checks"
:components
((:file "preflight")))
newer traverse always fails
older traverse fails when db-agraph-preflight is evaluated, ok
when loaded or compiled
\ No newline at end of file
;;; -*- Lisp -*-
;;; check that added nesting via modules doesn't confuse ASDF
(load "script-support")
(load "../asdf")
(in-package #:common-lisp-user)
(exit-on-error
(setf asdf:*central-registry* nil)
(load (merge-pathnames "test-nested-components-1.asd"))
(print
(list
:a
(asdf::traverse (make-instance 'asdf:compile-op)
(asdf:find-system 'test-nested-components-a))
(asdf::traverse (make-instance 'asdf:compile-op)
(asdf:find-system 'test-nested-components-b))
:x
(asdf::traverse (make-instance 'asdf:compile-op)
(asdf:find-system 'db-agraph-preflight))
(asdf::traverse (make-instance 'asdf:compile-op)
(asdf:find-system 'db-agraph-preflight-2))
))
#|
(asdf:oos 'asdf:compile-op 'test-nested-components-a)
(asdf:oos 'asdf:compile-op 'test-nested-components-b)
(print
(list
(asdf::traverse (make-instance 'asdf:load-op)
(asdf:find-system 'test-nested-components-a))
(asdf::traverse (make-instance 'asdf:load-op)
(asdf:find-system 'test-nested-components-b))))
|#
)
#|
(((#<ASDF:COMPILE-OP NIL {11DEB619}>
. #<ASDF:CL-SOURCE-FILE "preflight" {11B7B951}>)
(#<ASDF:COMPILE-OP NIL {11DEB619}>
. #<ASDF:MODULE "preflight-checks" {11B799A9}>)
(#<ASDF:COMPILE-OP NIL {11DEB619}>
. #<ASDF:SYSTEM "test-nested-components-a" {11AEDD59}>)
(#<ASDF:LOAD-OP NIL {11D04FE9}>
. #<ASDF:CL-SOURCE-FILE "preflight" {11B7B951}>)
(#<ASDF:LOAD-OP NIL {11D04FE9}>
. #<ASDF:MODULE "preflight-checks" {11B799A9}>)
(#<ASDF:LOAD-OP NIL {11D04FE9}>
. #<ASDF:SYSTEM "test-nested-components-a" {11AEDD59}>))
((#<ASDF:COMPILE-OP NIL {11E4D9B1}>
. #<ASDF:CL-SOURCE-FILE "preflight" {11C94B89}>)
(#<ASDF:COMPILE-OP NIL {11E4D9B1}>
. #<ASDF:SYSTEM "test-nested-components-b" {11C92819}>)
(#<ASDF:LOAD-OP NIL {11E4A911}>
. #<ASDF:CL-SOURCE-FILE "preflight" {11C94B89}>)
(#<ASDF:LOAD-OP NIL {11E4A911}>
. #<ASDF:SYSTEM "test-nested-components-b" {11C92819}>)))
|#
\ No newline at end of file
;;; -*- Lisp -*-
(asdf:defsystem try-reloading-dependency
:components ((:file "file3")))
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