From c36f9e9235b05cde7dfee24d3ef547f84a363509 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <tunes@google.com> Date: Thu, 27 Dec 2012 15:53:44 -0500 Subject: [PATCH] Test improvements. Be more selective in what warnings get quashed when upgrading ASDF. Skip bundle test on ABCL, ECL-bytecodes. Sleep more in test1. --- Makefile | 2 +- test/script-support.lisp | 10 ++++++++++ test/test-bundle.script | 2 +- test/test1.script | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 62d51901..9d0d748e 100644 --- a/Makefile +++ b/Makefile @@ -105,7 +105,7 @@ test-upgrade: for tag in 1.37 1.97 1.369 `git tag -l '2.0??'` `git tag -l '2.??'` ; do \ rm -f $$fa ; \ for x in load-system load-lisp load-lisp-compile-load-fasl load-fasl just-load-fasl ; do \ - lo="(handler-bind ((warning #'muffle-warning)) (load \"tmp/asdf-$${tag}.lisp\"))" ; \ + lo="(asdf-test::load-old-asdf \"$${tag}\")" ; \ echo "Testing upgrade from ASDF $${tag} using method $$x" ; \ git show $${tag}:asdf.lisp > tmp/asdf-$${tag}.lisp ; \ case ${lisp}:$$tag:$$x in \ diff --git a/test/script-support.lisp b/test/script-support.lisp index aa0ba8bc..d83403bb 100644 --- a/test/script-support.lisp +++ b/test/script-support.lisp @@ -53,6 +53,16 @@ :defaults *asdf-directory*) *asdf-lisp*)))) +(defun load-old-asdf (tag) + (let ((old-asdf + (merge-pathnames + (make-pathname :directory `(:relative "tmp") + :name (format nil "asdf-~A" tag) + :defaults *asdf-directory*) + *asdf-lisp*))) + (handler-bind (#+sbcl (sb-kernel:redefinition-warning #'muffle-warning)) + (load old-asdf)))) + (defun load-asdf () (load *asdf-fasl*) (use-package :asdf :asdf-test) diff --git a/test/test-bundle.script b/test/test-bundle.script index 2f935b12..3637e541 100644 --- a/test/test-bundle.script +++ b/test/test-bundle.script @@ -14,7 +14,7 @@ (when (find-package :test-package) (delete-package :test-package)) (asdf:defsystem :test-bundle-1 :components ((:file "file1") (:file "file3"))) (asdf:defsystem :test-bundle-2 :depends-on (:test-bundle-1) :components ((:file "file2"))) - #-(and ecl ecl-bytecmp) + #-(or abcl (and ecl ecl-bytecmp)) (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)))) diff --git a/test/test1.script b/test/test1.script index 7dd5d993..22186edf 100644 --- a/test/test1.script +++ b/test/test1.script @@ -19,9 +19,9 @@ (assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package))) (DBG "now remove file2 that depends-on file1 check that file1 is _not_ recompiled, but file2 is") - (asdf::run-shell-command "rm -f ~A" (namestring file2)) + (asdf::delete-file-if-exists file2) ;; filesystem mtime has 1 second granularity. Make sure even fast machines see a difference. - (sleep 1) + (sleep 1.5) (asdf:operate 'asdf:load-op 'test1) (assert (= file1-date (file-write-date file1))) (assert (< file2-date (file-write-date file2))) -- GitLab