From: Tomas Volf <~@wolfsden.cz>
To: Troy Figiel <troy@troyfigiel.com>
Cc: guix-devel@gnu.org
Subject: Re: Golang check phase skipping some tests?
Date: Tue, 16 Jan 2024 12:16:08 +0100 [thread overview]
Message-ID: <ZaZleJuWvCROvnmN@ws> (raw)
In-Reply-To: <65b75d58-e27b-4d02-80be-d87b86bf0342@troyfigiel.com>
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On 2024-01-14 22:12:38 +0100, Troy Figiel wrote:
> 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.
I tend to agree (on both accounts). I am not aware of anything Guix specific
here that would prevent it, but maybe someone from golang team will chime in.
Have a nice day,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-01-16 11:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-14 21:12 Golang check phase skipping some tests? Troy Figiel
2024-01-16 11:16 ` Tomas Volf [this message]
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
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=ZaZleJuWvCROvnmN@ws \
--to=~@wolfsden.cz \
--cc=guix-devel@gnu.org \
--cc=troy@troyfigiel.com \
/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.