Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jun 2022 19:02:56 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: 8d69a1fd3921 - main - misc/py-ezc3d: Fix tests
Message-ID:  <202206221902.25MJ2uhg025181@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=8d69a1fd3921b762c5161db631094411fcbcfbe4

commit 8d69a1fd3921b762c5161db631094411fcbcfbe4
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-06-22 19:02:13 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-06-22 19:02:54 +0000

    misc/py-ezc3d: Fix tests
---
 misc/py-ezc3d/Makefile | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/misc/py-ezc3d/Makefile b/misc/py-ezc3d/Makefile
index f4bc6778443d..c0489cd1a957 100644
--- a/misc/py-ezc3d/Makefile
+++ b/misc/py-ezc3d/Makefile
@@ -24,6 +24,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	pyomeca
 GH_TUPLE=	google:googletest:3880b13:googletest/external/gtest # https://github.com/pyomeca/ezc3d/issues/256
 
+TEST_ARGS=	${WRKSRC}/test/python3
 TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 post-install:
@@ -35,4 +36,19 @@ post-install:
 			ezc3d/_ezc3d.so \
 			ezc3d/libezc3d.so
 
+pre-test: # download test c3d files
+	# download archives
+	@${MKDIR} ${WRKSRC}/test/c3dFiles
+	@cd ${WRKDIR} && ${FETCH_CMD} -q https://github.com/pyomeca/ezc3d-testFiles/archive/master.zip -o ${WRKSRC}/test/c3dFiles/ezc3d-testFiles-master.zip
+.for f in Sample01.zip Sample02.zip
+	@cd ${WRKDIR} && ${FETCH_CMD} -q https://www.c3d.org/data/${f} -o ${WRKSRC}/test/c3dFiles/${f}
+.endfor
+	# extract archives
+.for n in ezc3d-testFiles-master Sample01 Sample02
+	@cd ${WRKSRC}/test/c3dFiles && ${MKDIR} ${n} && cd ${n} && ${TAR} -xf ../${n}.zip
+.endfor
+	# move *.c3d files into a flat folder
+	@${MKDIR} ${WRKSRC}/test/c3dTestFiles
+	@${CP} `${FIND} ${WRKSRC} -name "*.c3d"` ${WRKSRC}/test/c3dTestFiles
+
 .include <bsd.port.mk>



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