Do not run subprocess test unless cc or gcc exist (#2850)

Running this test in a linux docker without cc or gcc installed,
caused a failure.
This commit is contained in:
Paulo Matos 2019-10-07 14:00:18 +02:00 committed by GitHub
parent 482fcd6d59
commit eda5f7a817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -558,13 +558,15 @@
(unless (eq? (system-type) 'windows)
(let* ([dir (make-temporary-file "sub~a" 'directory)]
[exe (build-path dir "check")])
(when (system* (or (find-executable-path "cc")
(find-executable-path "gcc"))
[exe (build-path dir "check")]
[cc-path (or (find-executable-path "cc")
(find-executable-path "gcc"))])
(when (and cc-path
(system* cc-path
"-o"
exe
(path->complete-path "unix_check.c" (or (current-load-relative-directory)
(current-directory))))
(current-directory)))))
(test #t 'subprocess-state (system* exe)))
(delete-directory/files dir)))