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