From d5ae88b8c9bc472b791dd2783c2ecc13bb154750 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Sun, 13 Apr 2014 18:47:14 -0400
Subject: [PATCH] Disable the image-op test on LispWorks/Windows

---
 test/test-program.script | 119 ++++++++++++++++++++-------------------
 1 file changed, 62 insertions(+), 57 deletions(-)

diff --git a/test/test-program.script b/test/test-program.script
index 13766fce..c88c8ea9 100644
--- a/test/test-program.script
+++ b/test/test-program.script
@@ -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
-- 
GitLab