mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-05 14:09:53 +03:00
support/testing: add python-dbus-next test
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
b273326368
commit
f40219ff69
40
support/testing/tests/package/test_python_dbus_next.py
Normal file
40
support/testing/tests/package/test_python_dbus_next.py
Normal file
@@ -0,0 +1,40 @@
|
||||
import textwrap
|
||||
|
||||
|
||||
from tests.package.test_python import TestPythonPackageBase
|
||||
|
||||
|
||||
class TestPythonPy3DBusNext(TestPythonPackageBase):
|
||||
__test__ = True
|
||||
config = TestPythonPackageBase.config + \
|
||||
"""
|
||||
BR2_PACKAGE_DBUS=y
|
||||
BR2_PACKAGE_PYTHON3=y
|
||||
BR2_PACKAGE_PYTHON_DBUS_NEXT=y
|
||||
"""
|
||||
sample_scripts = ["tests/package/sample_python_dbus_next.py"]
|
||||
|
||||
def run_sample_scripts(self):
|
||||
config = \
|
||||
"""
|
||||
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
||||
<busconfig>
|
||||
<policy user="root">
|
||||
<allow own="dbus.next.sample"/>
|
||||
<allow send_destination="dbus.next.sample"/>
|
||||
</policy>
|
||||
</busconfig>
|
||||
"""
|
||||
config = textwrap.dedent(config)
|
||||
config_dir = "/etc/dbus-1/system.d"
|
||||
config_fn = "dbus.next.sample.conf"
|
||||
|
||||
# Setup and reload D-Bus configuration
|
||||
self.emulator.run("mkdir -p " + config_dir)
|
||||
self.emulator.run("cat > " + config_dir + "/" + config_fn +
|
||||
" <<EOF" + config + "EOF")
|
||||
self.emulator.run("killall -SIGHUP dbus-daemon")
|
||||
|
||||
# Run test scripts
|
||||
super().run_sample_scripts()
|
||||
Reference in New Issue
Block a user