Skip to content
Snippets Groups Projects
Commit 5c9726e5 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Don't use :interactive in test-program, it can really suck on LispWorks / Windows.

Instead, refactor how we call make-hello-world.
parent 18bcccf8
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
(asdf-test::frob-packages) (asdf-test::frob-packages)
(println "This is make-hello-world, testing its standard-output.") ; *standard-output*
(println "This is make-hello-world, testing its error-output." *error-output*)
(println "This is make-hello-world, testing its stdout." *stdout*)
(println "This is make-hello-world, testing its stderr." *stderr*)
#+mkcl #+mkcl
(defun add-mkcl-dll (pathname) (defun add-mkcl-dll (pathname)
;; make sure mkcl-X.X.X.dll is the same directory as the executable ;; make sure mkcl-X.X.X.dll is the same directory as the executable
......
...@@ -28,20 +28,26 @@ ...@@ -28,20 +28,26 @@
;; Disable any user source registry. ;; Disable any user source registry.
(initialize-source-registry `(:source-registry :ignore-inherited-configuration)) (initialize-source-registry `(:source-registry :ignore-inherited-configuration))
(defun make-hello-world (kind)
(assert-equal
0
(nth-value 2
(run-program
(symbol-call
#+allegro :lisp-path #+allegro *lisp*
:lisp-invocation :lisp-invocation-arglist
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval (format nil "(asdf-test::make-hello-~a)" kind))
:input nil :ignore-error-status t
:output (list *standard-output* :linewise t :prefix "stdout: ")
:error-output (list *error-output* :linewise t :prefix "stderr: ")))))
(DBG "test image-op") (DBG "test image-op")
(defparameter img (output-file (make-operation 'image-op) (find-system :hello-world-example))) (defparameter img (output-file (make-operation 'image-op) (find-system :hello-world-example)))
(assert (absolute-pathname-p img)) (assert (absolute-pathname-p img))
(delete-file-if-exists img) (delete-file-if-exists img)
(DBG "- first create an executable image") (DBG "- first create an executable image")
(assert-equal (make-hello-world 'image)
(nth-value 2
(run-program
(symbol-call :lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval "(asdf-test::make-hello-image)")
:output :interactive :error-output :interactive :input nil))
0)
(assert (probe-file* img) () "Can't find image file ~S" img) (assert (probe-file* img) () "Can't find image file ~S" img)
(DBG "- then, use it") (DBG "- then, use it")
...@@ -85,16 +91,7 @@ ...@@ -85,16 +91,7 @@
(assert (absolute-pathname-p exe)) (assert (absolute-pathname-p exe))
(delete-file-if-exists exe) (delete-file-if-exists exe)
(DBG "- first, create the standalone program") (DBG "- first, create the standalone program")
(assert-equal (make-hello-world 'program)
(nth-value 2
(run-program
(symbol-call :lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:eval "(asdf-test::make-hello-program)")
:output :interactive :error-output :interactive :input nil))
0)
(assert (probe-file* exe) () "Can't find executable file ~S" exe) (assert (probe-file* exe) () "Can't find executable file ~S" exe)
(DBG "- use that") (DBG "- use that")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment