X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Frun-program.test.sh;h=03778521bce05af1be75da7c6ee2a808ed2f7b3c;hb=260de2062fca170efdac3e42491d7d866c2d2e56;hp=beb6e42905259c455b7c41906704a74c0a105a44;hpb=972ab4ebe38803a62c9f942cba5a82e2365babe3;p=sbcl.git diff --git a/tests/run-program.test.sh b/tests/run-program.test.sh index beb6e42..0377852 100644 --- a/tests/run-program.test.sh +++ b/tests/run-program.test.sh @@ -13,6 +13,8 @@ # absolutely no warranty. See the COPYING and CREDITS files for # more information. +. ./subr.sh + # Make sure that there's at least something in the environment (for # one of the tests below). SOMETHING_IN_THE_ENVIRONMENT='yes there is' @@ -20,7 +22,8 @@ export SOMETHING_IN_THE_ENVIRONMENT PATH=/some/path/that/does/not/exist:${PATH} export PATH -${SBCL:-sbcl} <<'EOF' +# This should probably be broken up into separate pieces. +run_sbcl --eval "(defvar *exit-ok* $EXIT_LISP_WIN)" <<'EOF' ;; test that $PATH is searched (assert (zerop (sb-ext:process-exit-code (sb-ext:run-program "true" () :search t :wait t)))) @@ -90,7 +93,7 @@ ${SBCL:-sbcl} <<'EOF' ;; fully buffered.) (let ((str (with-output-to-string (s) (run-program "/bin/sh" - '("-c" "(echo Foo; sleep 2s; echo Bar)>&2") + '("-c" "(echo Foo; sleep 2; echo Bar)>&2") :output s :search t :error :output :wait t)))) (assert (string= str (format nil "Foo~%Bar~%")))) @@ -103,12 +106,8 @@ ${SBCL:-sbcl} <<'EOF' 'error) ;; success convention for this Lisp program run as part of a larger script - (sb-ext:quit :unix-status 52))) + (sb-ext:quit :unix-status *exit-ok*))) EOF -if [ $? != 52 ]; then - echo test failed: $? - exit 1 -fi +check_status_maybe_lose "run program tests" $? -# success convention -exit 104 +exit $EXIT_TEST_WIN