git: 8d69a1fd3921 - main - misc/py-ezc3d: Fix tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Jun 2022 19:02:56 UTC
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>