Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 2021 18:35:13 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c9c013238755 - main - biology/unikmer: Add 'test' target
Message-ID:  <202108141835.17EIZD1S084708@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9c0132387559dfedb29f59712332eeab5305c27

commit c9c0132387559dfedb29f59712332eeab5305c27
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-08-14 18:34:40 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-08-14 18:35:11 +0000

    biology/unikmer: Add 'test' target
---
 biology/unikmer/Makefile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/biology/unikmer/Makefile b/biology/unikmer/Makefile
index 327bdb52446d..e7f5472aea25 100644
--- a/biology/unikmer/Makefile
+++ b/biology/unikmer/Makefile
@@ -9,6 +9,8 @@ COMMENT=	Toolkit for nucleic acid k-mer analysis, set operations on k-mers
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+TEST_DEPENDS=	csvtk:science/csvtk
+
 USES=		go:modules
 
 GO_MODULE=	github.com/shenwei356/unikmer
@@ -16,4 +18,15 @@ GO_TARGET=	./${PORTNAME}
 
 PLIST_FILES=	bin/${PORTNAME}
 
+TEST_USES=	perl5
+
+do-test: # from the benchmark section in README
+	@cd ${WRKSRC} && \
+		${GO_CMD} test . -bench=Bench* -benchmem \
+			| ${GREP} Bench \
+			| perl -pe 's/\s\s+/\t/g' \
+			| csvtk cut -Ht -f 1,3-5 \
+			| csvtk add-header -t -n test,time,memory,allocs \
+			| csvtk pretty -t -r
+
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108141835.17EIZD1S084708>