From 9517e607b26b513dca0c1c5ff0b9a113dd6e0b54 Mon Sep 17 00:00:00 2001 From: Francois-Rene Rideau <fare@tunes.org> Date: Sun, 5 Feb 2017 09:31:53 -0500 Subject: [PATCH] Fix os detection in run-test This shall address Allegro testing issues on Windows. Also, no need for an ALLEGRO_NOISY variable. --- test/run-tests.sh | 10 +++++----- test/test-program.script | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index d05640a56..97e7a9e95 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -181,9 +181,9 @@ do_tests () { # not used currently but leave here for future reference. # case $(uname) in - CYGWIN*) os=windows ;; - Darwin) os=macos ;; - Linux) os=linux ;; + CYGWIN*|MSYS_NT*) os=windows ;; + Darwin*) os=macos ;; + Linux*) os=linux ;; *) os=unknown ;; esac @@ -223,9 +223,9 @@ case "$lisp" in # echo ALLEGRO=$ALLEGRO flags="-q" nodebug="-batch" - if [ "$os" = windows ] && [ -z "$ALLEGRO_NOISY" ] ; then + if [ "$os" = windows ] ; then adir=$(dirname "${command}") ; - allegroName=$(basename "${command}") ; + allegroName=$(basename "${command}" ".exe") ; if [[ ${allegroName: -1} == "8" ]] ; then build=build ; else build=buildi ; fi ; # this takes somewhat unjustifiable advantage of the fact that # the Allegro images have the same name (with .dxl extension) diff --git a/test/test-program.script b/test/test-program.script index f7442742f..da366c80c 100644 --- a/test/test-program.script +++ b/test/test-program.script @@ -1,7 +1,8 @@ ;;; -*- Lisp -*- (DBG :foo (current-lisp-file-pathname)) -(unless (or #+(or allegro (and clisp os-unix) clozure cmucl (and ecl (not ecl-bytecmp)) lispworks mkcl sbcl scl) t) +(unless (or #+(or allegro (and clisp os-unix) clozure cmucl + (and ecl (not ecl-bytecmp)) lispworks mkcl sbcl scl) t) (DBG "Creating images is not supported on your CL implementation") (leave-test "Skipping test" 0)) @@ -43,6 +44,7 @@ (lisp-invocation:invoke-lisp :implementation-type (lisp-invocation/allegro-variants:current-lisp-variant) :cross-compile nil + :console t :load (native-namestring (subpathname *test-directory* "make-hello-world.lisp")) :eval (format nil "(asdf-test::make-hello-~(~a~))" kind) :run-program-args @@ -70,6 +72,7 @@ :implementation-type (lisp-invocation/allegro-variants:current-lisp-variant) :cross-compile nil :image-path (native-namestring img) + :console t :eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)" :run-program-args '(:output :lines :error-output t))) '("hello, world")) @@ -81,6 +84,7 @@ :implementation-type (lisp-invocation/allegro-variants:current-lisp-variant) :image-path (native-namestring img) :cross-compile nil + :console t :eval "(uiop:restore-image :entry-point 'hello:entry-point :lisp-interaction nil)" :arguments '("a" "b c" "d") :run-program-args '(:output :lines :error-output t)) -- GitLab