@@ -155,6 +155,7 @@ PTESTS_SLOW = "\
python3-cryptography \
python3-numpy \
python3-uvloop \
+ python3-websockets \
python3-xmltodict \
strace \
tar \
new file mode 100755
@@ -0,0 +1,3 @@
+#!/bin/sh
+# tests/trio requires python3-trio, which is not in oe-core
+pytest --automake --ignore=tests/trio
@@ -4,12 +4,23 @@ HOMEPAGE = "https://github.com/aaugustin/websockets"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=51924a6af4495b8cfaee1b1da869b6f4"
-inherit pypi python_setuptools_build_meta
+# The PyPI sdist prunes tests, so fetch from git for ptest
+SRC_URI = "\
+ git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \
+ file://run-ptest \
+"
+SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b"
+
+CVE_PRODUCT = "websockets_project:websockets"
-SRC_URI[sha256sum] = "acfea4c20bf54384883ea33b1240fc1db4f52e190823a4e2b334bc3e8bfca96a"
+inherit python_setuptools_build_meta ptest-python-pytest
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN} = " \
python3-asyncio \
"
+
+RDEPENDS:${PN}-ptest += "\
+ python3-misc \
+"