DBusTests: fix not working tests 82/187382/1
authorTomasz Jeschke <t.jeschke@samsung.com>
Wed, 22 Aug 2018 11:13:47 +0000 (13:13 +0200)
committerTomasz Jeschke <t.jeschke@samsung.com>
Wed, 22 Aug 2018 11:13:47 +0000 (13:13 +0200)
Access to DBus was changed.
Now to connect to specific interface on DBus
a config with the names of interfaces is needed.

Change-Id: I8c0eac297da074cb198ad86792fc49c0b149921d

project-tool
tests/dbustests.conf [new file with mode: 0644]

index a74d063..4879921 100755 (executable)
@@ -118,6 +118,9 @@ while [ $# -gt 0 ]; do
                esac ;;
 
                '-t'|'--run-tets')
+               sdb -d shell mount -o remount,rw /
+               sdb push "tests/dbustests.conf" "/etc/dbus-1/system.d/"
+               sdb -d shell killall -HUP dbus-daemon
                RUN_TESTS=1
                shift
                ;;
diff --git a/tests/dbustests.conf b/tests/dbustests.conf
new file mode 100644 (file)
index 0000000..bd34d66
--- /dev/null
@@ -0,0 +1,15 @@
+<!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="itest.itest"/>
+        <allow send_interface="itest.itest"/>
+        <allow send_interface="itest.itest2"/>
+        <allow send_interface="sitest.sitest"/>
+        <allow send_interface="org.freedesktop.DBus.Properties"/>
+    </policy>
+    <policy context="default">
+        <deny own="itest.itest"/>
+        <deny send_destination="itest.itest"/>
+    </policy>
+</busconfig>