On Friday, February 21st, 2025 at 11:15 AM, Stuart Henderson 
<s...@spacehopper.org> wrote:

> On 2025/02/21 10:13, open...@systemfailure.net wrote:
> 
> > Hello,
> > 
> > Here's an update for net/py3-rns (patch attached). Version 0.9.2 is a 
> > maintenance release, fixing several bugs: 
> > https://github.com/markqvist/Reticulum/releases/tag/0.9.2
> > 
> > I included a very simple patch for 'make test' to run (since 'make test' 
> > was calling 'python' instead of 'python3'). All tests are passing except 
> > one (error message also attached). I'm not able yet to understand why, but 
> > oddly enough this test case fails on -current and passes on -stable. The 
> > port seems to run fine anyway, both on -current and -stable (tested on 
> > amd64).
> 
> 
> please add this rather than patching
> 
> pre-test:
> ln -s ${MODPY_BIN} ${WRKDIR}/bin/python


OK, here's a corrected version (see attachment). I didn't know the proper way 
to solve this issue, still learning 😅

The same test case still fails on -current, and succeeds on -stable, by the way.


> 
> > =================================== FAILURES 
> > ===================================
> > __________________ TestChannel.test_send_receive_message_test 
> > __________________
> > 
> > self = <tests.channel.TestChannel testMethod=test_send_receive_message_test>
> > 
> > def test_send_receive_message_test(self):
> > print("Channel test send and receive message")
> > message = MessageTest()
> > 
> > def check(rx_message: MessageBase):
> > self.assertIsInstance(rx_message, message.class)
> > self.assertEqual(message.id, rx_message.id)
> > self.assertEqual(message.data, rx_message.data)
> > self.assertNotEqual(message.not_serialized, rx_message.not_serialized)
> > 
> > > self.eat_own_dog_food(message, check)
> > 
> > tests/channel.py:384:
> > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> > _ _
> > tests/channel.py:339: in eat_own_dog_food
> > self.assertEqual(1, envelope.tries)
> > E AssertionError: 1 != 2
> > ----------------------------- Captured stdout call 
> > -----------------------------
> > 
> > Channel test send and receive message
> > =========================== short test summary info 
> > ============================
> > FAILED tests/all.py::TestChannel::test_send_receive_message_test - 
> > AssertionE...
> > =================== 1 failed, 32 passed, 1 skipped in 53.66s 
> > ===================
> > *** Error 1 in . (/usr/ports/lang/python/python.port.mk:397 'do-test': @ cd 
> > /usr/ports/pobj/py-rns-0.9.2/rns-0.9.2 && /usr/bin/env -i CC=cc ...)
> > *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3098 
> > '/usr/ports/pobj/py-rns-0.9.2/.test_done': @cd /usr/ports/net/py-rns && 
> > exec...)
> > *** Error 2 in /usr/ports/net/py-rns 
> > (/usr/ports/infrastructure/mk/bsd.port.mk:2712 'test': @lock=py3-rns-0.9.2; 
> > export _LOCKS_HELD=" py3-r...)
> 
> 
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/py-rns/Makefile,v
diff -u -p -r1.1.1.1 Makefile
--- Makefile	28 Jan 2025 01:42:10 -0000	1.1.1.1
+++ Makefile	21 Feb 2025 16:56:00 -0000
@@ -1,6 +1,6 @@
 COMMENT =		cryptography-based networking stack
 
-MODPY_DISTV =		0.9.1
+MODPY_DISTV =		0.9.2
 DISTNAME=		rns-${MODPY_DISTV}
 PKGNAME =		py-${DISTNAME}
 
@@ -22,5 +22,8 @@ MODPY_PYTEST_ARGS =	-v tests/all.py
 
 RUN_DEPENDS =		devel/py-serial \
 			security/py-cryptography
+
+pre-test:
+			ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/py-rns/distinfo,v
diff -u -p -r1.1.1.1 distinfo
--- distinfo	28 Jan 2025 01:42:10 -0000	1.1.1.1
+++ distinfo	21 Feb 2025 16:56:00 -0000
@@ -1,2 +1,2 @@
-SHA256 (rns-0.9.1.tar.gz) = bs7KkVeexb7Uoe6OniNIx06/bkerRlMLuu6HsYhnKx4=
-SIZE (rns-0.9.1.tar.gz) = 17555908
+SHA256 (rns-0.9.2.tar.gz) = mOK1ESQq3kjLqCtUJzDzCS62rKxVE5tFkuhUKwACVvo=
+SIZE (rns-0.9.2.tar.gz) = 17556262

Reply via email to