From b0248a52e0ae261d5cbb475066ecf6a321a9a1d0 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Sun, 19 Sep 2021 20:03:10 +0200 Subject: 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 --- guix/build/minetest-build-system.scm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'guix/build/minetest-build-system.scm') diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm index 477cc3d1d0..c14c6d1fcc 100644 --- a/guix/build/minetest-build-system.scm +++ b/guix/build/minetest-build-system.scm @@ -23,6 +23,7 @@ #:use-module (ice-9 rdelim) #:use-module (ice-9 receive) #:use-module (ice-9 regex) + #:use-module (ice-9 exceptions) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module ((guix build copy-build-system) #:prefix copy:) #:export (%standard-phases @@ -199,20 +200,24 @@ auth_backend = sqlite3 (define (stop? line) (and (string? line) (string-contains line "ACTION[Server]: singleplayer [127.0.0.1] joins game."))) - (let loop () - (match (read-line port) - ((? error? line) - (error "minetest raised an error: ~a" line)) - ((? stop?) + (let loop ((has-errors? #f)) + (match `(,(read-line port) ,has-errors?) + (((? error? line) _) + (display line) + (newline) + (loop #t)) + (((? stop?) #f) (kill pid SIGINT) (close-port port) (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) (newline) - (loop)) - ((? eof-object?) - (error "minetest didn't start")))))))) + (loop has-error?)))))))) (define %standard-phases (modify-phases gnu:%standard-phases -- cgit v1.2.3 From 9a8c7808ccb538926ae1a5e8fbd96ac823c388b4 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Sun, 19 Sep 2021 22:42:49 +0200 Subject: build-system/minetest: Install config.txt and _config.txt. * guix/build/minetest-build-system.scm (mod-install-plan): Add "config.txt" and "_config.txt" to the list of installed files. Signed-off-by: Tobias Geerinckx-Rice --- guix/build/minetest-build-system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guix/build/minetest-build-system.scm') diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm index c14c6d1fcc..5f68686067 100644 --- a/guix/build/minetest-build-system.scm +++ b/guix/build/minetest-build-system.scm @@ -41,7 +41,7 @@ ;; See ;; for an incomple list of files that can be found in mods. #:include ("mod.conf" "modpack.conf" "settingtypes.txt" "depends.txt" - "description.txt") + "description.txt" "config.txt" "_config.txt") #:include-regexp (".lua$" ".png$" ".ogg$" ".obj$" ".b3d$" ".tr$" ".mts$")))) -- cgit v1.2.3