diff options
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/golang.scm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index a5d199df2c..6bc9b3a6d5 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -5950,11 +5950,17 @@ filters for Go.") #:phases #~(modify-phases %standard-phases (replace 'check - (lambda* (#:key inputs #:allow-other-keys #:rest args) - (unless - ;; The tests fail when run with gccgo. - (false-if-exception (search-input-file inputs "/bin/gccgo")) - (apply (assoc-ref %standard-phases 'check) args))))))) + (lambda* (#:key tests? import-path inputs #:allow-other-keys) + (when tests? + ;; The tests fail when run with gccgo. + (let ((gccgo? (false-if-exception + (search-input-file inputs "/bin/gccgo")))) + (if gccgo? + (format #t "skipping tests with gccgo compiler~%") + ;; XXX: Workaround for go-build-system's lack of Go + ;; modules support. + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" "./...")))))))))) (synopsis "Determine equality of values in Go") (home-page "https://github.com/google/go-cmp") (description |