From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 72189@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#72189] [PATCH 4/7] gnu: go-github-com-jdkato-twine: Enable tests.
Date: Fri, 19 Jul 2024 20:57:29 +0100 [thread overview]
Message-ID: <e944d097e0dc9b34338ea7500c7fd93d669e6193.1721399836.git.sharlatanus@gmail.com> (raw)
In-Reply-To: <cover.1721399836.git.sharlatanus@gmail.com>
* gnu/packages/golang-xyz.scm (go-github-com-jdkato-twine) [source]: Add
snippet adjusting changed upstream module import path.
[arguments]: <#:phases>: Remove 'build and 'patch-module-import-path
phases. Add 'disable-failing-tests phase. Use custom 'check phase.
Change-Id: I8553705ca0b812c772005460b242ce47b0c65ced
---
gnu/packages/golang-xyz.scm | 40 ++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 159f2dd44e..6b6c953a1d 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -2644,33 +2644,33 @@ (define-public go-github-com-jdkato-twine
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1hbpxcrcsbi975lklrhzyzk0fzn79pxicvfyf2sckmd2n6jb4ayy"))))
+ (base32 "1hbpxcrcsbi975lklrhzyzk0fzn79pxicvfyf2sckmd2n6jb4ayy"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Module name has been changed upstream.
+ (substitute* (find-files "." "\\.go$")
+ (("gopkg.in/neurosnap/sentences.v1")
+ "github.com/neurosnap/sentences"))))))
(build-system go-build-system)
(arguments
(list
- ;; FIXME: Adjust tests sute or check with upstram:
- ;; === Failed
- ;; === FAIL: nlp/segment TestGoldenRules (0.00s)
- ;; segment_test.go:143: 25. Double quotations inside sentence
- ;; segment_test.go:144: Actual: [She turned to him, "This is great." she said.]
- ;; segment_test.go:145: Actual: 2, Expected: 1
- ;; segment_test.go:146: ===
- #:tests? #f
#:import-path "github.com/jdkato/twine"
#:phases
#~(modify-phases %standard-phases
- (add-after 'unpack 'patch-module-import-path
- (lambda* (#:key import-path #:allow-other-keys)
- (with-directory-excursion (string-append "src/" import-path)
- (substitute* (find-files "." "\\.go$")
- (("gopkg.in/neurosnap/sentences.v1")
- "github.com/neurosnap/sentences")))))
- (replace 'build
- (lambda* (#:key import-path #:allow-other-keys)
+ (add-after 'unpack 'disable-failing-tests
+ (lambda* (#:key tests? import-path #:allow-other-keys)
(with-directory-excursion (string-append "src/" import-path)
- (invoke "go" "build" "-v" "-x" "-ldflags=-s -w" "-trimpath" "./...")))))))
- (native-inputs
- (list gotestsum))
+ (substitute* "nlp/segment/segment_test.go"
+ (("TestGoldenRules") "OffTestGoldenRules")))))
+ ;; XXX: Workaround for go-build-system's lack of Go modules
+ ;; support.
+ (delete 'build)
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "go" "test" "-v" "./..."))))))))
(propagated-inputs
(list go-github-com-montanaflynn-stats
go-github-com-neurosnap-sentences
--
2.41.0
next prev parent reply other threads:[~2024-07-19 19:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 15:52 [bug#72189] [PATCH 0/7] Update and unbundle vale - part II Sharlatan Hellseher
2024-07-19 19:56 ` bug#72191: " Sharlatan Hellseher
2024-07-19 19:57 ` [bug#72189] [PATCH 1/7] gnu: Add go-github-com-niklasfasching-go-org Sharlatan Hellseher
2024-07-19 19:57 ` [bug#72189] [PATCH 2/7] gnu: Add go-github-com-xi2-xz Sharlatan Hellseher
2024-07-19 19:57 ` [bug#72189] [PATCH 3/7] gnu: Add go-github-com-mholt-archiver-v3 Sharlatan Hellseher
2024-07-19 19:57 ` Sharlatan Hellseher [this message]
2024-07-19 19:57 ` [bug#72189] [PATCH 5/7] gnu: go-github-com-spf13-viper: Disable tests Sharlatan Hellseher
2024-07-19 19:57 ` [bug#72189] [PATCH 6/7] gnu: go-github-com-mitchellh-mapstructure: Update to 1.5.0 Sharlatan Hellseher
2024-07-19 19:57 ` [bug#72189] [PATCH 7/7] gnu: vale: Update to 3.4.2 Sharlatan Hellseher
2024-07-22 22:31 ` bug#72189: [PATCH 0/7] Update and unbundle vale - part II Sharlatan Hellseher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e944d097e0dc9b34338ea7500c7fd93d669e6193.1721399836.git.sharlatanus@gmail.com \
--to=sharlatanus@gmail.com \
--cc=72189@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.