gnu: go-github-com-dgraph-io-badger: Simplify package.

* gnu/packages/golang-xyz.scm (go-github-com-dgraph-io-badger)
[arguments]<test-flags>: Move skip logic here.
<phases>: Use default 'check.

Change-Id: I2dba8ea691337999ed9d6f9c9b20300fb9576187
This commit is contained in:
Sharlatan Hellseher 2024-12-15 18:12:58 +00:00
parent 93bb9b39f3
commit 72a3683689
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -2818,6 +2818,10 @@ encoding/decoding. It has no dependencies.")
(arguments
(list
#:import-path "github.com/dgraph-io/badger"
#:test-flags
#~(list "-skip"
;; Test fails with error: assertion is not equal.
"TestBuildKeyValueSizeHistogram/All_same_size_key-values")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-failing-tests
@ -2829,15 +2833,7 @@ encoding/decoding. It has no dependencies.")
;; fmt.Sprint(x)?).
;; See: <https://github.com/dgraph-io/badger/issues/2103>.
(("\"testing\"") (string-append "\"testing\"\n\"fmt\""))
(("string") "fmt.Sprint")))))
;; XXX: Replace when go-build-system supports nested path.
(replace 'check
(lambda* (#:key import-path tests? #:allow-other-keys)
(when tests?
(with-directory-excursion (string-append "src/" import-path)
(invoke "go" "test" "-v"
"-skip" "TestBuildKeyValueSizeHistogram"
"./..." ))))))))
(("string") "fmt.Sprint"))))))))
(native-inputs
(list go-github-com-stretchr-testify))
(propagated-inputs