2005-11-05 23:04:33 +01:00
|
|
|
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"
|
2006-01-21 16:52:40 +01:00
|
|
|
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).
|
2005-11-05 23:04:33 +01:00
|
|
|
|
2005-12-11 18:13:36 +01:00
|
|
|
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.
|
|
|
|
|
2006-01-21 18:13:42 +01:00
|
|
|
The first parameter of the "test" program can be used
|
|
|
|
to select specific tests, like this:
|
|
|
|
./test TestEvolution::testVCard
|
|
|
|
|
2005-11-05 23:04:33 +01:00
|
|
|
"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.
|