Tuesday, March 01, 2022

Re: [UPDATE] lang/nim to 1.6.4

Stuart Henderson <stu@spacehopper.org> wrote:
> On 2022/03/01 00:41, Volker Schlecht wrote:
> > + # _pbuild can't open outbound TCP connections
> > + rm -rf ${WRKSRC}/tests/stdlib/tnetconnect.nim
>
> I don't know a lot about nim, but IMHO it's often helpful to keep
> network tests in ports, even if they're usually disabled for people
> using PORTS_PRIVSEP the pf rule can be commented-out if you're
> wanting to investigate something to do with network-related tests.

i don't know much either (i spent more time building than playing
with it as of now) but i completely agree. i'm also thinking of
not disabling the tests but rather adding the missing test deps and
live with the fact that it can't find jester and zip/zipfiles (we
don't have them in the port tree, right?) FWIW neither freebsd nor
alpine are adding extra deps besides nodejs.

i did a round of testing with the patch below and the pf rule
temporarly disabled. it's quite a pain to re-read the logs in less
due to all the ANSI escape for the colors, but with a bit of awk
magic:

% make 2>&1 | tee test.log
...
% awk '/PASS/{pass++}/FAIL/{fail++}/SKIP/{skip++}END{print pass, fail, skip}' \
test.log
1794 11 68

so 1794 passed test, 11 failed and 68 skipped.

(quite ironic that it can outputs colors and times but not the
number of passed/failed/skipped tests)

so i'd go with the following instead


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/lang/nim/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 28 Feb 2022 13:16:10 -0000 1.12
+++ Makefile 1 Mar 2022 09:50:23 -0000
@@ -20,7 +20,10 @@ WANTLIB = c m pthread
MODULES = lang/python

PORTHOME = ${WRKDIR}
-TEST_DEPENDS = lang/node
+TEST_DEPENDS = archivers/p7zip,-main \
+ archivers/unzip \
+ lang/node \
+ multimedia/sfml

SUBST_VARS += CFLAGS

@@ -61,9 +64,10 @@ do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/nim
${INSTALL_DATA} ${WRKSRC}/config/*.cfg ${PREFIX}/share/examples/nim

+# note that some test needs internet connection
do-test:
cd ${WRKSRC} && ${SETENV} ${ALL_TEST_ENV} ./koch tests all -d:release \
- --parallelBuild:1 --listFullPaths --listCmd \
+ --parallelBuild:${MAKE_JOBS}
--nimcache:"${WRKSRC}/nimcache-port-test" \
--putenv:"PATH=${PATH}"

No comments:

Post a Comment