Commit b0071f87 authored by Gary King's avatar Gary King

2007-07-26 10:55 gwking@metabang.com

parent ea78e21b
;;; This is asdf: Another System Definition Facility. $Revision: 1.108 $
;;; This is asdf: Another System Definition Facility. $Revision: 1.109 $
;;;
;;; Feedback, bug reports, and patches are all welcome: please mail to
;;; <cclan-list@lists.sf.net>. But note first that the canonical
......@@ -115,7 +115,7 @@
(in-package #:asdf)
(defvar *asdf-revision* (let* ((v "$Revision: 1.108 $")
(defvar *asdf-revision* (let* ((v "$Revision: 1.109 $")
(colon (or (position #\: v) -1))
(dot (position #\. v)))
(and v colon dot
......@@ -799,6 +799,10 @@ system."))
(defmethod output-files ((operation compile-op) (c static-file))
nil)
(defmethod input-files ((op compile-op) (c static-file))
nil)
;;; load-op
(defclass basic-load-op (operation) ())
......
(in-package #:common-lisp-user)
(load "test/script-support.lisp")
(cond ((probe-file "asdf.lisp")
(multiple-value-bind (result warnings-p errors-p)
(compile-file "asdf.lisp")
(declare (ignore result))
(cond (warnings-p
(leave-lisp "Testuite failed: ASDF compiled with warnings" 1))
(errors-p
(leave-lisp "Testuite failed: ASDF compiled with ERRORS" 2))
(t
(leave-lisp "ASDF compiled cleanly" 0)))))
(t
(leave-lisp "Testsuite failed: unable to find ASDF source" 3)))
\ No newline at end of file
#!/bin/sh
if [ -z "$2" ]; then
scripts="*.script"
else
scripts="$2"
fi
sok=1
do_tests() {
......@@ -10,7 +17,7 @@ if [ $? -eq 0 ] ; then
test_pass=0
test_fail=0
failed_list=""
for i in *.script;
for i in $scripts ;
do
echo "Testing: $i" >&2
test_count=`expr "$test_count" + 1`
......@@ -67,6 +74,11 @@ elif [ "$lisp" = "allegro" ] ; then
fasl_ext="fasl"
command="alisp -q --batch "
fi
elif [ "$lisp" = "allegromodern" ] ; then
if type mlisp ; then
fasl_ext="fasl"
command="mlisp -q --batch "
fi
fi
......
(in-package #:common-lisp-user)
#+allegro
(setf excl:*warn-on-nested-reader-conditionals* nil)
;;; code adapted from cl-launch (any errors in transcription are mine!)
;; http://www.cliki.net/cl-launch
(defun leave-lisp (message return)
(when message
(format *error-output* message))
#+allegro
(excl:exit return)
#+clisp
(ext:quit return)
#+(or cmu scl)
(unix:unix-exit code)
#+ecl
(si:quit return)
#+gcl
(lisp:quit code)
#+lispworks
(lispworks:quit :status code :confirm nil :return nil :ignore-errors-p t)
#+(or openmcl mcl)
(ccl::quit return)
#+sbcl
(sb-ext:quit :unix-status return)
(error "Don't know how to quit Lisp; wanting to use exit code ~a" return))
(defmacro exit-on-error (&body body)
`(handler-case
(progn ,@body
(leave-lisp "Script succeeded" 0))
(error (c)
(format *error-output* "~a" c)
(leave-lisp "Script failed" 1))))
\ No newline at end of file
#|
make sure that serial t and static-files don't cause full rebuilds all
the time...
|#
(defsystem static-and-serial
:version "0.1"
:serial t
:components
((:static-file "file2.lisp")
(:static-file "run-tests.sh")
(:file "file1")))
;;; -*- Lisp -*-
(load "script-support")
(load "../asdf")
(exit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:operate 'asdf:load-op 'static-and-serial)
(defvar file1-date (file-write-date (compile-file-pathname "file1")))
;; cheat
(setf asdf::*defined-systems* (make-hash-table :test 'equal))
;; date should stay same
(sleep 1)
(asdf:operate 'asdf:load-op 'static-and-serial)
(assert (= (file-write-date (compile-file-pathname "file1")) file1-date))
)
\ No newline at end of file
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