unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Golang check phase skipping some tests?
@ 2024-01-14 21:12 Troy Figiel
  2024-01-16 11:16 ` Tomas Volf
  2024-01-17 15:53 ` Simon Tournier
  0 siblings, 2 replies; 16+ messages in thread
From: Troy Figiel @ 2024-01-14 21:12 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 1196 bytes --]

Hi everyone,

When looking into the Go build system, I noticed the default check phase
runs (invoke "go" "test" import-path), which only runs the tests in the
root directory of the source. Running the tests in all subdirectories
would require something like this instead:

--8<---------------cut here---------------start------------->8---
(define* (check #:key tests? import-path #:allow-other-keys)
  "Run the tests for the package named by IMPORT-PATH."
  (when tests?
    (invoke "go" "test" (string-append import-path "/...")))
  #t)
--8<---------------cut here---------------end--------------->8---

For example, if the -v flag is added (which might be a better default?)
to the check phase of go-github-stretchr-testify, it can be seen that
only `TestImports' runs, none of the tests in assert, http, etc.
However, the source code in these subdirectories is still recursively
copied to out during the install phase.

Is this desired behaviour? I assumed it isn't, because it looks like we
are skipping a lot of tests during the check phase. However, I might
also simply be overlooking something here as I am new to packaging
Golang with Guix.

Best wishes,

Troy

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 6367 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <CAO+9K5opsgMkcgc+keoHxd9RAUWX1SnYNcnQs4y+MVKKdyojOQ@mail.gmail.com>]

end of thread, other threads:[~2024-02-15 17:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-14 21:12 Golang check phase skipping some tests? Troy Figiel
2024-01-16 11:16 ` Tomas Volf
2024-01-17 19:30   ` Maxim Cournoyer
2024-01-17 15:53 ` Simon Tournier
2024-01-18 10:25   ` Sharlatan Hellseher
2024-01-18 19:31     ` Maxim Cournoyer
2024-01-18 21:31     ` Troy Figiel
2024-01-18 21:45       ` Sharlatan Hellseher
2024-01-31 10:07         ` Troy Figiel
2024-02-05 22:11           ` Troy Figiel
2024-02-14 15:26     ` Simon Tournier
2024-02-15 10:10       ` Sharlatan Hellseher
2024-02-15 13:34         ` Simon Tournier
     [not found] <CAO+9K5opsgMkcgc+keoHxd9RAUWX1SnYNcnQs4y+MVKKdyojOQ@mail.gmail.com>
2024-01-19 21:54 ` Maxim Cournoyer
2024-01-19 22:42   ` Sharlatan Hellseher
2024-01-22  4:14     ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).