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

Use lisp-invocation 1.0.1 to better support LispWorks.

parent 01cf051c
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
(unless (find-system :lisp-invocation nil) (unless (find-system :lisp-invocation nil)
(leave-test "Couldn't find lisp-invocation. Skipping the rest of the test." 0)) (leave-test "Couldn't find lisp-invocation. Skipping the rest of the test." 0))
(load-system :lisp-invocation) (load-system :lisp-invocation)
(unless (version-satisfies (find-system :lisp-invocation) "1") (unless (version-satisfies (find-system :lisp-invocation) "1.0.1")
(leave-test "Lisp-invocation library isn't new enough to test successfully. Skipping test-program." 0)) (leave-test "Lisp-invocation library isn't new enough to test successfully. Skipping test-program." 0))
;; 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))
...@@ -34,16 +34,15 @@ ...@@ -34,16 +34,15 @@
(assert-equal (assert-equal
0 0
(nth-value 2 (nth-value 2
(run-program (lisp-invocation:invoke-lisp
(symbol-call #+allegro :lisp-path #+allegro *lisp*
:lisp-invocation :lisp-invocation-arglist :cross-compile nil
#+allegro :lisp-path #+allegro *lisp* :load (native-namestring (subpathname *test-directory* "make-hello-world.lisp"))
:cross-compile nil :eval (format nil "(asdf-test::make-hello-~a)" kind)
:load (native-namestring (subpathname *test-directory* "make-hello-world.lisp")) :run-program-args
:eval (format nil "(asdf-test::make-hello-~a)" kind)) `(:input nil :ignore-error-status t
:input nil :ignore-error-status t :output (,*standard-output* :linewise t :prefix "stdout: ")
:output (list *standard-output* :linewise t :prefix "stdout: ") :error-output (,*error-output* :linewise t :prefix "stderr: "))))))
:error-output (list *error-output* :linewise t :prefix "stderr: ")))))
#-(or (and lispworks os-macosx) #-(or (and lispworks os-macosx)
(and ecl os-macosx)) (and ecl os-macosx))
...@@ -60,28 +59,24 @@ ...@@ -60,28 +59,24 @@
(assert-equal (assert-equal
(nest (nest
#+lispworks (last) #+lispworks (last)
(run-program (lisp-invocation:invoke-lisp
(symbol-call #+allegro :lisp-path #+allegro *lisp*
:lisp-invocation :lisp-invocation-arglist :cross-compile nil
#+allegro :lisp-path #+allegro *lisp* :image-path (native-namestring img)
:cross-compile nil :eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:image-path (native-namestring img) :run-program-args '(:output :lines :error-output t)))
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)")
:output :lines :error-output t))
'("hello, world")) '("hello, world"))
(DBG "- now, use it with arguments") (DBG "- now, use it with arguments")
#-(or lispworks scl) ;; These can't be passed arguments the normal way #-(or lispworks scl) ;; These can't be passed arguments the normal way
(assert-equal (assert-equal
(run-program (lisp-invocation:invoke-lisp
(symbol-call #+allegro :lisp-path #+allegro *lisp*
:lisp-invocation :lisp-invocation-arglist :image-path (native-namestring img)
#+allegro :lisp-path #+allegro *lisp* :cross-compile nil
:image-path (native-namestring img) :eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:cross-compile nil :arguments '("a" "b c" "d")
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)" :run-program-args '(:output :lines :error-output t))
:arguments '("a" "b c" "d"))
:output :lines :error-output t)
'("hello, world" '("hello, world"
"You passed 3 arguments:" "You passed 3 arguments:"
" \"a\"" " \"a\""
......
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