From 5b841a42fbf3ffd929ba76e37753ba1cb4797125 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Tue, 3 Sep 2024 21:27:47 +0000 Subject: [PATCH] gnu: go-github-com-elliotchance-orderedmap: Fix tests. * gnu/packages/golang-xyz.scm (go-github-com-elliotchance-orderedmap) [arguments]<#:phases>: Replace 'check and only run short tests so as to exclude flaky performance tests. <#:unpack-path>: Set it, to relax modification in any inherited packages. (go-github-com-elliotchance-orderedmap-v2) [arguments]: Swap to "substitute-keyword-arguments" instead of overwriting after inheritance. Change-Id: If9fbc5510643f9d5e3ccff09f71e00a9cdfbe92f Co-authored-by: Sharlatan Hellseher Signed-off-by: Sharlatan Hellseher --- gnu/packages/golang-xyz.scm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 98642b12f0..ee3b410b6d 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -2154,7 +2154,18 @@ program's running, don't expect consistent results between platforms (base32 "1hhyk96l6mfijkay9ga6jqpczpn34fbqkjrqj3v9pf5p1hzd0xdx")))) (build-system go-build-system) (arguments - (list #:import-path "github.com/elliotchance/orderedmap")) + (list + #:import-path "github.com/elliotchance/orderedmap" + #:unpack-path "github.com/elliotchance/orderedmap" + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + ;; The full test suite runs flaky performance tests, so only + ;; run the short tests. + (invoke "go" "test" "-test.short" ".")))))))) (native-inputs (list go-github-com-stretchr-testify)) (home-page "https://github.com/elliotchance/orderedmap") @@ -2179,9 +2190,9 @@ O(1) for @code{Set}, @code{Get}, @code{Delete} and @code{Len}.") (sha256 (base32 "11bvia6cflq46nzc2hfgikgxyck7wskyi0i7ksy9r0d41l4jh4l9")))) (arguments - (list - #:import-path "github.com/elliotchance/orderedmap/v2" - #:unpack-path "github.com/elliotchance/orderedmap")))) + (substitute-keyword-arguments + (package-arguments go-github-com-elliotchance-orderedmap) + ((#:import-path _) "github.com/elliotchance/orderedmap/v2"))))) (define-public go-github-com-emersion-go-ical (package