mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
a8ddfaf5b3
- bump 2.21.1 -> 4.0.4 - remove over-specified runtime dependencies; 4.0.x has no runtime Python dependencies beyond python3-light - add test.sh Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
32 lines
743 B
Bash
Executable File
32 lines
743 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ "$1" = python3-dbus-fast ] || exit 0
|
|
|
|
PKG_VERSION="$2"
|
|
|
|
python3 - "$PKG_VERSION" << 'EOF'
|
|
import sys
|
|
from dbus_fast.message import Message
|
|
from dbus_fast.constants import MessageType
|
|
from dbus_fast.signature import Variant
|
|
from dbus_fast.__version__ import __version__
|
|
|
|
assert __version__ == sys.argv[1], f"expected {sys.argv[1]}, got {__version__}"
|
|
|
|
msg = Message(
|
|
message_type=MessageType.METHOD_CALL,
|
|
path="/org/example/Test",
|
|
interface="org.example.Test",
|
|
member="TestMethod",
|
|
)
|
|
assert msg.path == "/org/example/Test"
|
|
assert msg.interface == "org.example.Test"
|
|
assert msg.member == "TestMethod"
|
|
|
|
v = Variant("s", "hello")
|
|
assert v.type.token == "s"
|
|
assert v.value == "hello"
|
|
|
|
print("python3-dbus-fast OK")
|
|
EOF
|