mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-21 18:19:15 -05:00
build-system/minetest: Gather whole failing test output.
* guix/build/minetest-build-system.scm (check): Gather the whole output when a test fails. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
This commit is contained in:
parent
6979d57e53
commit
b0248a52e0
1 changed files with 14 additions and 9 deletions
|
@ -23,6 +23,7 @@ (define-module (guix build minetest-build-system)
|
||||||
#:use-module (ice-9 rdelim)
|
#:use-module (ice-9 rdelim)
|
||||||
#:use-module (ice-9 receive)
|
#:use-module (ice-9 receive)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
|
#:use-module (ice-9 exceptions)
|
||||||
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
|
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
|
||||||
#:use-module ((guix build copy-build-system) #:prefix copy:)
|
#:use-module ((guix build copy-build-system) #:prefix copy:)
|
||||||
#:export (%standard-phases
|
#:export (%standard-phases
|
||||||
|
@ -199,20 +200,24 @@ (define (error? line)
|
||||||
(define (stop? line)
|
(define (stop? line)
|
||||||
(and (string? line)
|
(and (string? line)
|
||||||
(string-contains line "ACTION[Server]: singleplayer [127.0.0.1] joins game.")))
|
(string-contains line "ACTION[Server]: singleplayer [127.0.0.1] joins game.")))
|
||||||
(let loop ()
|
(let loop ((has-errors? #f))
|
||||||
(match (read-line port)
|
(match `(,(read-line port) ,has-errors?)
|
||||||
((? error? line)
|
(((? error? line) _)
|
||||||
(error "minetest raised an error: ~a" line))
|
(display line)
|
||||||
((? stop?)
|
(newline)
|
||||||
|
(loop #t))
|
||||||
|
(((? stop?) #f)
|
||||||
(kill pid SIGINT)
|
(kill pid SIGINT)
|
||||||
(close-port port)
|
(close-port port)
|
||||||
(waitpid pid))
|
(waitpid pid))
|
||||||
((? string? line)
|
(((? eof-object?) #f)
|
||||||
|
(error "minetest didn't start"))
|
||||||
|
(((or (? stop?) (? eof-object?)) #t)
|
||||||
|
(error "minetest raised an error"))
|
||||||
|
(((? string? line) has-error?)
|
||||||
(display line)
|
(display line)
|
||||||
(newline)
|
(newline)
|
||||||
(loop))
|
(loop has-error?))))))))
|
||||||
((? eof-object?)
|
|
||||||
(error "minetest didn't start"))))))))
|
|
||||||
|
|
||||||
(define %standard-phases
|
(define %standard-phases
|
||||||
(modify-phases gnu:%standard-phases
|
(modify-phases gnu:%standard-phases
|
||||||
|
|
Loading…
Reference in a new issue