summaryrefslogtreecommitdiff
path: root/HACKING
blob: dcbecb262b1c88842e28a0dfd024837226fcf84c (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
The code follows the code formatting of the Funambol
Sync4j C++ client library. Just emulate the existing
code when possible.

Exceptions are used to report errors, but not in code
which is called from inside the Sync4j library because
that library does not handle exceptions for compatibility
reasons. In that case special case must be taken to not
forget that an error occurred (EvolutionSyncSource::m_hasFailed).

"make check" in the src directory compiles and runs unit
tests. Those tests were written inside the CppUnit
[http://cppunit.sourceforge.net/cppunit-wiki] framework
and so they (and just they) require that "cppunit-config"
is in the shell search path. Before running them, setup
your Evolution and ~/.sync4j configuration as described
in the README section 'Exchanging Data' (create address
books 'sync4jevolution test #1/2', etc).

Running the test with the environment variable SYNC4J_LOG
set to the server's log file ensures that for each
individual sync session both the client and the corresponding
server log are stored in individual files in the src
directory. The filenames are derived from the tests and
the steps executed for each of them.

The first parameter of the "test" program can be used
to select specific tests, like this:
   ./test TestEvolution::testVCard

"make valgrind" runs the same tests inside valgrind
[http://www.valgrind.org]. A suppression file is
used to hide errors inside system libraries which
are not caused by the sync4jevolution or Sync4j C++
library code. Most likely the suppressions will only
work on Debian GNU/Linux 3.1 ("Sarge") - feel free
to add more for your system.