Commit e28c48fa authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Make ccl::external-program-wait more robust on Windows.

Make some run-program tests Unix-only that fail on Windows for semi-good reasons.
Sleep 2 seconds instead of one in test-stamp-propagation, in case that makes things more stable.
parent b62a0b1e
* Fix bugs on http://bugs.launchpad.net/asdf/+bugs
* fix directory-files to not return directories on CCL, etc. Add tests.
* use cl-test-grid to see if asdf-user can :use most of UIOP.
* use cl-test-grid to see if asdf-user can :use most (all?) of UIOP.
Unhappily, on SBCL, sb-grovel uses asdf and sb-ext,
which causes a clash with run-program.
Or has this been changed long enough ago? Can it be special-cased?
* have a mode to explain WHY a component needs to be recompiled.
* have a better defsystem form verifier - see lp#1007335
* have a function verify-strict-asd that can verify a asd is pure lp#541562
......@@ -10,6 +12,7 @@
* have with-input-file use the encodings mechanism?
* have a single test .asd that tests as many features as possible, use it for upgrade test.
* implement deferred warnings support on lispworks
* work with cl-test-grid to eliminate deferred warnings from quicklisp libraries
* fix upgrade on clisp, cmucl, abcl (if still broken)
** Extract minimal test case, build a battery of automated tests
* Bug found by fe[nl]ix: infinite loop if the definitions in an asd file
......
......@@ -128,14 +128,14 @@
(format t "~&Testing stamp propagation by defsystem ~S~%" defsystem)
(DBG "loading system")
(reload defsystem)
(sleep 1)
(sleep 2)
(DBG "touching first source file and reloading")
(DBG "defsystem should recompile & reload everything")
(touch-file1.lisp)
(assert-equal (sanitize-log (reload defsystem))
'((:compiling :system) (:compile-toplevel :file1) (:load-toplevel :file1)
(:compile-toplevel :file2) (:load-toplevel :file2)))
(sleep 1)
(sleep 2)
(DBG "touching first fasl file and reloading")
(DBG "defsystem should reload it, recompile & reload the other")
(touch-file1.fasl defsystem)
......
......@@ -80,8 +80,6 @@
;; NB1: run-shell-command is deprecated. Use run-program instead.
;; NB2: we do NOT support stderr capture to *verbose-out* anymore in run-shell-command.
;; If you want 2>&1 redirection, you know where to find it.
(assert-equal "ok 1" (dewindowize (run-program '("echo" "ok 1") :output :line)))
(assert-equal "ok 1" (dewindowize (run-program '("echo" "ok 1") :output '(:string :stripped t))))
(assert-equal '(:ok 1) (run-program '("echo" ":ok 1") :output :forms))
(assert-equal "ok" (dewindowize (stripln
(with-output-to-string (*standard-output*)
......@@ -205,6 +203,8 @@ Testing run-program
(defun unix-only-test/run-program ()
(assert-equal '("ok 1") (run-program "echo ok 1" :output :lines))
(assert-equal '("ok 1") (run-program '("echo" "ok 1") :output :lines))
(assert-equal "ok 1" (run-program '("echo" "ok 1") :output '(:string :stripped t)))
(assert-equal '(nil nil 0) (multiple-value-list (run-program "true")))
(signals subprocess-error (run-program "false"))
......@@ -214,23 +214,23 @@ Testing run-program
;; a basic smoke test
(assert-equal '("Single")
(run-program `("grep" "Single" ,tf) :output :lines))
(run-program `("grep" "Single" ,tf) :output :lines))
;; Make sure space is handled correctly
(assert-equal '("double entry")
(run-program `("grep" "double entry" ,tf) :output :lines))
(run-program `("grep" "double entry" ,tf) :output :lines))
;; Make sure space is handled correctly
(assert-equal '("triple word entry")
(run-program `("grep" "triple word entry" ,tf) :output :lines))
(run-program `("grep" "triple word entry" ,tf) :output :lines))
;; Testing special characters
(loop :for char :across "+-_.,%@:/\\!&*(){}"
:for str = (string char) :do
(assert-equal (list (format nil "escape ~A" str))
(run-program
`("grep" ,(format nil "[~A]" str) ,tf)
:output :lines)))
(assert-equal (list (format nil "escape ~A" str))
(run-program
`("grep" ,(format nil "[~A]" str) ,tf)
:output :lines)))
;; Test that run-program signals an error
;; with an executable that doesn't return 0
......
......@@ -46,18 +46,18 @@
(setf excl:*warn-on-nested-reader-conditionals* nil))
(setf *print-readably* nil))
#+clozure
(in-package :ccl)
#+clozure (in-package :ccl)
#+(and clozure windows-target) ;; See http://trac.clozure.com/ccl/ticket/1117
(eval-when (:load-toplevel :compile-toplevel :execute)
(unless (fboundp 'external-process-wait)
(in-development-mode
(defun external-process-wait (proc)
(when (external-process-pid proc)
(when (and (external-process-pid proc) (eq (external-process-:%status proc) :running))
(with-interrupts-enabled
(wait-on-semaphore (external-process-completed proc))))))))
#+clozure
(in-package :uiop/common-lisp)
(wait-on-semaphore (external-process-completed proc))))
(values (external-process-%exit-code proc)
(external-process-%status proc))))))
#+clozure (in-package :uiop/common-lisp)
#+cormanlisp
......
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