commit:     b71ba8f148f6a45767fb8ee9c8c7ebaccbc4d2e4
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 31 08:40:10 2024 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 08:40:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b71ba8f1

app-admin/hcloud: add upstream tests

Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 .../hcloud/{hcloud-1.48.0.ebuild => hcloud-1.48.0-r1.ebuild}      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app-admin/hcloud/hcloud-1.48.0.ebuild 
b/app-admin/hcloud/hcloud-1.48.0-r1.ebuild
similarity index 71%
rename from app-admin/hcloud/hcloud-1.48.0.ebuild
rename to app-admin/hcloud/hcloud-1.48.0-r1.ebuild
index c4449b25b091..49cedeae2460 100644
--- a/app-admin/hcloud/hcloud-1.48.0.ebuild
+++ b/app-admin/hcloud/hcloud-1.48.0-r1.ebuild
@@ -18,12 +18,16 @@ src_compile() {
 }
 
 src_test() {
-       # For upstream a simple test is run 'hcloud version'
        ./hcloud version
        if [[ $? -ne 0 ]]
        then
-               die "Test failed"
+               die "hcloud version test failed"
        fi
+
+       # Avoid error like:
+       # -buildmode=pie not supported when -race is enabled on linux/amd64
+       GOFLAGS=${GOFLAGS//-buildmode=pie}
+       ego test -coverpkg=./... -coverprofile=coverage.txt -v -race ./...
 }
 
 src_install() {

Reply via email to