From 304b83d50967fc7bd21ff0b8d1bbe5416a0bec7d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 12 Aug 2024 16:40:26 -0300 Subject: queue.scm: Disable Go test timeout --- src/org/euandre/queue.scm | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm index 3f31d3a..c32cf35 100644 --- a/src/org/euandre/queue.scm +++ b/src/org/euandre/queue.scm @@ -1700,6 +1700,8 @@ connections correctly."))) "readme=:README.md" "readme=:README")))) + +(define setenvfmt "Environment variable `~a' set to `~a'.~%") (define-public go-full (package (inherit go-1.22) @@ -1709,18 +1711,26 @@ connections correctly."))) #~(modify-phases #$phases (add-before 'build 'recover-binary-stdlib (lambda _ - (define (setenvrc env-var value) - (setenv env-var value) - (format #t - "Environment variable `~a' set to `~a'.~%" - env-var - value)) - (setenvrc "GODEBUG" "installgoroot=all"))) + (let ((name "GODEBUG") + (value "installgoroot=all")) + (setenv name value) + (format #t #$setenvfmt name value)))) + ;; Not all of us work with fancy modern computers that have have + ;; too much memory and computing power for programmers to waste. + ;; Therefore, Go's default timeout of 10 minutes (!!) to run all + ;; tests isn't enough, so we disable it and instead inherit the + ;; timeout from Guix itself. How not to like software that adheres + ;; so well to the Unix philosophy? + (add-before 'build 'tolerate-slow-tests + (lambda _ + (let ((name "GO_TEST_TIMEOUT_SCALE") + (value "0")) + (setenv name value) + (format #t #$setenvfmt name value)))) (add-after 'install 'install-binaries - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (dest (string-append out "/lib/go/pkg"))) - (copy-recursively "pkg" dest)))) + (lambda _ + (copy-recursively "pkg" + (string-append #$output "/lib/go/pkg")))) (delete 'strip))))))) -- cgit v1.2.3