tests: fix embedding tests on mingw

We need to set the path environment variable for the test programs to
    find ecl.dll
This commit is contained in:
Marius Gerbershagen 2018-07-07 22:07:24 +02:00
parent 2ad7cef5dd
commit aad6d252d6

View file

@ -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))