git: c9c013238755 - main - biology/unikmer: Add 'test' target
Yuri Victorovich
yuri at FreeBSD.org
Sat Aug 14 18:35:13 UTC 2021
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c9c0132387559dfedb29f59712332eeab5305c27
commit c9c0132387559dfedb29f59712332eeab5305c27
Author: Yuri Victorovich <yuri at FreeBSD.org>
AuthorDate: 2021-08-14 18:34:40 +0000
Commit: Yuri Victorovich <yuri at 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>
More information about the dev-commits-ports-all
mailing list