blob: 5a084e567d8912f86e1772c35cce5b9e87ab1e56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
Tests for D-Bus binding test rig:
Tests are functions which will perform a particular transformation on the input
and return the result. They should be defined as a D-Bus signature and
description of the function:
test-introspect.xml
The SingleTests Tests and TestSignals interfaces should be implemented by the
servers. The TestClient interface should be implemented by the client.
Servers must also support:
Peer.Ping
Introspectable.Introspect on all objects and parent paths
Clients try and cause these to fail in the most obscure way possible. Servers
make sure all of their methods are called each run. Output format:
Server:
<interface.function> ok
<interface.function> ok
....
<interface.function> untested
Client:
<interface.function> pass
<interface.function> pass
....
<interface.function> fail <id1>
<interface.function> fail <id2>
report <id1>: <text description of failure>
report <id2>: <text description of failure>
Starting clients and servers is done using Makefiles and chaining thereof. Each
binding should provide the following Makefile targets in their respective
top-level dirs:
cross-test-compile - do any compilation necessary to run the server and client
cross-test-server - run a server which binds to
org.freedesktop.DBus.Binding.TestServer. Listens and
answers method calls on the /Test object until Exit
is called. Then prints test reports.
cross-test-client - run a client which runs comprehensive tests against
the server, then calls Exit and prints test reports
Ignoring tests:
Tests can be ignored if you know they are going to fail. This will print a
list of ignored fails. To ignore tests create a file cross-test-ignore
containing a list of interface.function, one per line.
A note on Signals:
The tests involve two signals. Triggered is sent from the server to the
client when the Trigger() method is called. The client sends Trigger to the
server which should cause Response() to be called by the server on the
client.
|