From aad6d252d61f5dcb5bfa4c2ddb4a325bb85d5472 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Sat, 7 Jul 2018 22:07:24 +0200 Subject: [PATCH] tests: fix embedding tests on mingw We need to set the path environment variable for the test programs to find ecl.dll --- src/tests/normal-tests/embedding.lsp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/tests/normal-tests/embedding.lsp b/src/tests/normal-tests/embedding.lsp index a8322eb07..641e795a2 100644 --- a/src/tests/normal-tests/embedding.lsp +++ b/src/tests/normal-tests/embedding.lsp @@ -18,10 +18,15 @@ (c::linker-cc "tmp/ecl-aux.exe" '("tmp/ecl-aux.o")) (ecase capture-output ((nil) - (return-from test-C-program (zerop (si::system "tmp/ecl-aux.exe")))) + (return-from test-C-program (zerop (si::system #+mingw32 (format nil "PATH=%PATH%;~a tmp\\ecl-aux.exe" c::*ecl-library-directory*) + #-mingw32 "tmp/ecl-aux.exe")))) ((string :string) (with-output-to-string (s) - (let ((in (si::run-program "tmp/ecl-aux.exe" '() :output :stream)) + (let ((in (si::run-program "tmp/ecl-aux.exe" '() :output :stream + :environ (append #+mingw32 (list (format nil "PATH=~a;~a" + (ext:getenv "PATH") + c::*ecl-library-directory*)) + (ext:environ)))) line) (loop (setf line (read-line in nil)) @@ -30,7 +35,11 @@ ((t forms :forms) (do* ((all '()) (x t) - (in (si::run-program "tmp/ecl-aux.exe" '() :output :stream))) + (in (si::run-program "tmp/ecl-aux.exe" '() :output :stream + :environ (append #+mingw32 (list (format nil "PATH=~a;~a" + (ext:getenv "PATH") + c::*ecl-library-directory*)) + (ext:environ))))) ((null in) all) (setf x (ignore-errors (read in nil nil))) (unless x (return all))