mirror of
https://github.com/openwrt/packages.git
synced 2026-04-16 19:32:20 +00:00
Bump version 0.22.2 -> 0.33.0. Add python3-ctypes, python3-logging, python3-openssl to DEPENDS (required by the new version). Add test.sh to verify nursery-based concurrent task execution. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
23 lines
411 B
Bash
23 lines
411 B
Bash
#!/bin/sh
|
|
|
|
[ "$1" = python3-trio ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
import trio
|
|
|
|
results = []
|
|
|
|
async def worker(n):
|
|
await trio.sleep(0)
|
|
results.append(n)
|
|
|
|
async def main():
|
|
async with trio.open_nursery() as nursery:
|
|
for i in range(3):
|
|
nursery.start_soon(worker, i)
|
|
|
|
trio.run(main)
|
|
assert sorted(results) == [0, 1, 2], f"Expected [0,1,2], got {results}"
|
|
|
|
print("python3-trio OK")
|
|
EOF |