Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] build-styles/go.sh: run go test -v ${go_project:-go_import_path} in do_check
@ 2021-12-12 20:19 bobertlo
  2021-12-13  3:00 ` [PR PATCH] [Updated] " bobertlo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bobertlo @ 2021-12-12 20:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

There is a new pull request by bobertlo against master on the void-packages repository

https://github.com/bobertlo/void-packages go-test
https://github.com/void-linux/void-packages/pull/34496

[RFC] build-styles/go.sh: run go test -v ${go_project:-go_import_path} in do_check
There are 313 build_style=go packages, and currently 8 of them have tests defined in the package template.

I have been testing the go packages with this. So far, I have rebuilt 183 packages and there have been no errors and 64 packages have run tests successfully.

Ideally, more tests would be added (because they are a lot more common on internal libraries than command clients) but this is probably the safest default option.

A patch file from https://github.com/void-linux/void-packages/pull/34496.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-go-test-34496.patch --]
[-- Type: text/x-diff, Size: 751 bytes --]

From cc18d30f9bfd164be3604a6e7a129082f03b2acd Mon Sep 17 00:00:00 2001
From: Robert Lowry <bobertlo@gmail.com>
Date: Sun, 12 Dec 2021 13:58:29 -0600
Subject: [PATCH] build-styles/go.sh: run go test -v
 ${go_project:-go_import_path}

---
 common/build-style/go.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/build-style/go.sh b/common/build-style/go.sh
index d18116ee9633..659e968e344a 100644
--- a/common/build-style/go.sh
+++ b/common/build-style/go.sh
@@ -2,6 +2,11 @@
 # This helper is for templates for Go packages.
 #
 
+do_check() {
+	go_package=${go_package:-$go_import_path}
+	go test -v ${go_package}
+}
+
 do_configure() {
 	# $go_import_path must be set, or we can't link $PWD into $GOSRCPATH
 	# nor build from modules

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-29  0:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 20:19 [PR PATCH] [RFC] build-styles/go.sh: run go test -v ${go_project:-go_import_path} in do_check bobertlo
2021-12-13  3:00 ` [PR PATCH] [Updated] " bobertlo
2022-01-29  0:12 ` bobertlo
2022-01-29  0:12 ` [PR PATCH] [Closed]: " bobertlo

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 NNTP newsgroup(s).