diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-29 16:14:31 +0000 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-01-21 23:42:36 +0000 |
commit | d62a69922a3ad6d573842779e004eaf9b537de99 (patch) | |
tree | 864a393dda43532c0dd6614989c96cb895edf8c4 /gnu/packages/textutils.scm | |
parent | ccbb165fb2ff4ce82a90db0ecd2a8bde8fe896ba (diff) |
gnu: vale: Simplify.
* gnu/packages/textutils.scm (vale): Simplify.
[arguments] <test-flags>: Move skipped tests here.
<phases>: Use default 'check, add 'pre-check.
Change-Id: I133f6c6763d4643b595ffddec85a3bf7ad1d24fe
Diffstat (limited to 'gnu/packages/textutils.scm')
-rw-r--r-- | gnu/packages/textutils.scm | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index 59be80c19c..f60a641230 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -1520,31 +1520,26 @@ of a Unix terminal to HTML code.") #:embed-files #~(list ".*\\.gob") #:import-path "github.com/errata-ai/vale/cmd/vale" #:unpack-path "github.com/errata-ai/vale" + ;; Disable tests requring network access: Get + ;; "https://raw.githubusercontent.com/errata-ai/styles/master/library.json": + ;; dial tcp: lookup raw.githubusercontent.com on [::1]:53: read udp + ;; [::1]:52621->[::1]:53: read: connection refused. + #:test-flags + #~(list "-skip" + (string-join + (list "TestLibrary" + "TestLocalComplete" + "TestLocalDir" + "TestLocalOnlyStyles" + "TestLocalZip" + "TestNoPkgFound" + "TestV3Pkg") + "|")) #:phases #~(modify-phases %standard-phases - ;; Disable tests requring network access: Get - ;; "https://raw.githubusercontent.com/errata-ai/styles/master/library.json": - ;; dial tcp: lookup raw.githubusercontent.com on [::1]:53: - ;; read udp [::1]:52621->[::1]:53: read: connection refused. - (add-after 'unpack 'disable-failing-tests - (lambda* (#:key tests? unpack-path #:allow-other-keys) - (with-directory-excursion (string-append "src/" unpack-path) - (substitute* (find-files "." "\\_test.go$") - (("TestLibrary") "OffTestLibrary") - (("TestLocalComplete") "OffTestLocalComplete") - (("TestLocalDir") "OffTestLocalDir") - (("TestLocalOnlyStyles") "OffTestLocalOnlyStyles") - (("TestLocalZip") "OffTestLocalZip") - (("TestNoPkgFound") "OffTestNoPkgFound") - (("TestV3Pkg") "OffTestV3Pkg"))))) - ;; XXX: Workaround for go-build-system's lack of Go modules - ;; support. - (replace 'check - (lambda* (#:key tests? unpack-path #:allow-other-keys) - (when tests? - (with-directory-excursion (string-append "src/" unpack-path) - (setenv "HOME" "/tmp") - (invoke "go" "test" "-v" "./...")))))))) + (add-before 'check 'pre-check + (lambda _ + (setenv "HOME" "/tmp")))))) (native-inputs (list go-github-com-masterminds-sprig-v3 go-github-com-adrg-strutil |