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
5c9726e5
Commit
5c9726e5
authored
10 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/make-hello-world.lisp
+5
-0
5 additions, 0 deletions
test/make-hello-world.lisp
test/test-program.script
+16
-19
16 additions, 19 deletions
test/test-program.script
with
21 additions
and
19 deletions
test/make-hello-world.lisp
+
5
−
0
View file @
5c9726e5
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
test/test-program.script
+
16
−
19
View file @
5c9726e5
...
@@ -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")
...
...
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