Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Didier Verna
asdf
Commits
d5ae88b8
Commit
d5ae88b8
authored
10 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
Disable the image-op test on LispWorks/Windows
parent
5c9726e5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test-program.script
+62
-57
62 additions, 57 deletions
test/test-program.script
with
62 additions
and
57 deletions
test/test-program.script
+
62
−
57
View file @
d5ae88b8
...
...
@@ -42,69 +42,74 @@
:output (list *standard-output* :linewise t :prefix "stdout: ")
:error-output (list *error-output* :linewise t :prefix "stderr: ")))))
(DBG "test image-op")
(defparameter img (output-file (make-operation 'image-op) (find-system :hello-world-example)))
(assert (absolute-pathname-p img))
(delete-file-if-exists img)
(DBG "- first create an executable image")
(make-hello-world 'image)
(assert (probe-file* img) () "Can't find image file ~S" img)
#-(and lispworks os-windows)
(progn
(DBG "test image-op")
(defparameter img (output-file (make-operation 'image-op) (find-system :hello-world-example)))
(assert (absolute-pathname-p img))
(delete-file-if-exists img)
(DBG "- first create an executable image")
(make-hello-world 'image)
(assert (probe-file* img) () "Can't find image file ~S" img)
(DBG "- then, use it")
(assert-equal
(nest
#+lispworks (last)
(run-program
(symbol-call :lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)")
:output :lines :error-output t))
'("hello, world"))
(DBG "- then, use it")
(assert-equal
(nest
#+lispworks (last)
(run-program
(symbol-call
#+allegro :lisp-path #+allegro *lisp*
:lisp-invocation :lisp-invocation-arglist
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)")
:output :lines :error-output t))
'("hello, world"))
(DBG "- now, use it with arguments")
#-(or lispworks scl) ;; These can't be passed arguments the normal way
(assert-equal
(run-program
(symbol-call :lisp-invocation :lisp-invocation-arglist
#+allegro :lisp-path #+allegro *lisp*
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d"))
:output :lines :error-output t)
'("hello, world"
"You passed 3 arguments:"
" \"a\""
" \"b c\""
" \"d\""))
(DBG "- now, use it with arguments")
#-(or lispworks scl) ;; These can't be passed arguments the normal way
(assert-equal
(run-program
(symbol-call
#+allegro :lisp-path #+allegro *lisp*
:lisp-invocation :lisp-invocation-arglist
:image-path (native-namestring img)
:eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)"
:arguments '("a" "b c" "d"))
:output :lines :error-output t)
'("hello, world"
"You passed 3 arguments:"
" \"a\""
" \"b c\""
" \"d\"")))
(DBG "test program-op")
(unless (or #+(or clisp clozure (and ecl (not ecl-bytecmp)) lispworks mkcl sbcl) t
#+cmu nil ;; uncomment if you have 32-bit gcc support - or can autodetect
#+clisp (version-satisfies
(first (split-string (lisp-implementation-version) :separator " "))
"2.48"))
(DBG "Creating standalone programs is not supported on your CL implementation")
(leave-test "Skipping test" 0))
(progn
(DBG "test program-op")
(unless (or #+(or clisp clozure (and ecl (not ecl-bytecmp)) lispworks mkcl sbcl) t
#+cmu nil ;; uncomment if you have 32-bit gcc support - or can autodetect
#+clisp (version-satisfies
(first (split-string (lisp-implementation-version) :separator " "))
"2.48"))
(DBG "Creating standalone programs is not supported on your CL implementation")
(leave-test "Skipping test" 0))
(defparameter exe (output-file (make-operation 'program-op) (find-system :hello-world-example)))
(assert (absolute-pathname-p exe))
(delete-file-if-exists exe)
(DBG "- first, create the standalone program")
(make-hello-world 'program)
(assert (probe-file* exe) () "Can't find executable file ~S" exe)
(defparameter exe (output-file (make-operation 'program-op) (find-system :hello-world-example)))
(assert (absolute-pathname-p exe))
(delete-file-if-exists exe)
(DBG "- first, create the standalone program")
(make-hello-world 'program)
(assert (probe-file* exe) () "Can't find executable file ~S" exe)
(DBG "- use that")
(assert-equal (run-program `(,(native-namestring exe)) :output :lines :error-output t)
'("hello, world"))
(DBG "- use that")
(assert-equal (run-program `(,(native-namestring exe)) :output :lines :error-output t)
'("hello, world"))
(DBG "- use that with arguments")
(assert-equal (run-program `(,(native-namestring exe) "a" "b c" "d") :output :lines :error-output t)
'("hello, world"
"You passed 3 arguments:"
" \"a\""
" \"b c\""
" \"d\""))
(DBG "- use that with arguments")
(assert-equal (run-program `(,(native-namestring exe) "a" "b c" "d") :output :lines :error-output t)
'("hello, world"
"You passed 3 arguments:"
" \"a\""
" \"b c\""
" \"d\""))
)
#+(or ecl mkcl)
(progn
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment