@@ -131,6 +131,7 @@ commit hash and its date rather than a proper release tag."
(build-flags ''())
(tests? #t)
(parallel-build? #t)
+ (parallel-tests? #t)
(allow-go-reference? #f)
(system (%current-system))
(guile #f)
@@ -156,6 +157,7 @@ commit hash and its date rather than a proper release tag."
#:build-flags #$build-flags
#:tests? #$tests?
#:parallel-build? #$parallel-build?
+ #:parallel-tests? #$parallel-tests?
#:allow-go-reference? #$allow-go-reference?
#:inputs #$(input-tuples->gexp inputs)))))
@@ -239,9 +239,12 @@ unpacking."
(invoke "go" "env"))))
;; Can this also install commands???
-(define* (check #:key tests? import-path #:allow-other-keys)
+(define* (check #:key tests? import-path (parallel-tests? #t)
+ #:allow-other-keys)
"Run the tests for the package named by IMPORT-PATH."
(when tests?
+ (let* ((njobs (if parallel-tests? (parallel-job-count) 1)))
+ (setenv "GOMAXPROCS" (number->string njobs)))
(invoke "go" "test" import-path))
#t)