Commit graph

39 commits

Author SHA1 Message Date
Patrick Ohly
82debf7326 license: changed to LGPL v2.1 + v3
As with the previous change from AGPLv3 to LGPL v2.1, this is covered
by copyright ownership and/or the Funambol contributor agreement.

The motivation for adding v3 is greater flexibility regarding
reusing the code in other places and relicensing it.
2009-04-30 18:26:27 +02:00
Patrick Ohly
dae1b8854d testing: relicensed as LGPL v2.1, like the rest of the code
This is permitted by the Funambol contributor agreement (copy
is in doc/Sync4jContribution.pdf). It reduces the license mix
and allows distributing synccompare without special precautions.
2009-03-25 14:43:54 +01:00
Patrick Ohly
bd1d2d01ef vcard testing: use the right testcases for vcard21 conversion tests
Evolution vcard21 source defines testcases/vcard30.vcf as its native
test case file. For vcard21::testConversion we must use vcard21.vcf instead
because that is the format used for encoding the items.

Note that the test doesn't pass because synccompare does not support
old-style vcard and vcalendar encoding: line breaks aren't handled
correctly etc.
2009-03-25 14:43:51 +01:00
Patrick Ohly
4ae40026a4 configuration: removed obsolete config options and added WBXML
Removed the "encoding" source option. It was of dubious usefulness
with Funambol and has meaning with Synthesis at all.

Removed dead code in EvolutionSyncConfig.

Added "enableWBXML" sync option. WBXML is used by default, but for
debugging disabling it might be useful: dumping WBXML doesn't seem
to work reliably.

Most Client::Sync tests use the default encoding, usually WBXML unless
changed via CLIENT_TEST_XML=1. Client::Sync::*::testItemsXML always
uses XML and Client::Sync::*::testItems always WBXML.
2009-03-25 14:43:49 +01:00
Patrick Ohly
11e10f2556 testing: added Client::Sync::*::testConversion
The conversion test checks whether information is lost and/or modified
when converting the test items into the field list defined in the Synthesis
XML config. For that it converts into the field list and back, then compares
against the original test item file with synccompare.

Because a valid Synthesis session is necessary, this test hooks into
running a sync session via a callback that is triggered by the first
Synthesis progress event. It then aborts the session without contacting
the server.

boost::bind() with a reference should have worked (?), but didn't:
the bound function did not update the variable it was bound to.
Using a pointer worked.
2009-03-25 14:43:48 +01:00
Patrick Ohly
5aaf6a1a24 testing: pass parameters for syncing as struct, renamed function
Passing as struct makes it easier to extend. doSync() instead of just sync() is easier to search for.
2009-03-25 14:43:48 +01:00
Patrick Ohly
875704832a testing: added checking of sync source result and sync mode 2009-03-25 14:43:38 +01:00
Patrick Ohly
de2cc3c0f5 testing: re-enabled SyncReport and checking it 2009-03-25 14:43:38 +01:00
Patrick Ohly
8e9512cd20 testing: fixed log handling during Client::Sync
The logdir is now overridden so that all files (client.log, message
dumps, Synthesis logs) are written in a subdirectory names after
the current test. A <test>.log file captures all output written
outside of the sync itself.
2009-03-25 14:43:37 +01:00
Patrick Ohly
41aaec7eb2 testing: compiles and runs again, but output redirection is not working yet 2009-03-25 14:43:36 +01:00
Patrick Ohly
1170ba8b38 ClientTest: better infrastructure for data file comparisons
File names now only contain a single underscore instead of
multiple ones. The compare functions can be called so that they
return the result instead of throwing an assertion (useful for
doing multiple comparisons and then checking the result).
The synccompare Perl script is told to print the file names
that it is comparing.
2009-03-25 14:43:31 +01:00
Patrick Ohly
c74a620257 ClientTest: infrastructure for removing and updating specific items 2009-03-25 14:43:31 +01:00
Patrick Ohly
beb9d7887f ClientTest: test resuming a synchronization after a disconnect
Works for different situations (client has changes, server has
changes, both have changes) as well as for disconnects after every
single message in the synchronization. Uses the same infrastructure
as the other Client::Sync tests and therefore can be used to test
normal clients.

Only adding new items on client or server is currently implemented:
Client::Sync::vcard21::Retry::testInterruptResumeServerAdd
Client::Sync::vcard21::Retry::testInterruptResumeClientAdd

Results are not yet compared against outcome of uninterrupted
sync.
2009-03-25 14:43:30 +01:00
Patrick Ohly
3489ad43af testing: allow accumulating log prefixes dynamically 2009-03-25 14:43:30 +01:00
Patrick Ohly
6869110b3d testing: enhanced infrastructure (LUIDs)
Changed the utility functions so that they pass around and use
LUIDs. This allows building more complex tests which need to
modify specific items.
2009-03-25 14:43:30 +01:00
Patrick Ohly
807c835ccf tests: split big test into smaller ones
This helps g++ to complete compilation without requiring huge amount of memory.

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@26637 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:29 +01:00
Patrick Ohly
c344d25d8d fixed some (incorrect) gcc warnings about uninitialized vars, relaxed semantic checks in testLinkedItems
In testLinkedItems the SyncSource is now allowed to list a linked item as update
when the peer item (parent of child or child of parent) is
deleted/modified/added in the wrong order.

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@25760 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:29 +01:00
Patrick Ohly
22101a83d0 fixed detached event testing (ical20)
- the parent events accidentally had a RECURRENCE-ID, which turned them into
  specific instances
- clarified that some of the tests are too strict: child items without a parent
  are problematic and not necessarily supported by client (Evolution) and server
  (ScheduleWorld) => these tests can be disabled via -DLINKED_ITEMS_RELAXED_SEMANTIC=0

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@25438 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:29 +01:00
Patrick Ohly
7bcb8f00ca ical20: added testing of detached recurrences
Two VEVENTs were added to ical20.ics where one represents
the main event with recurrence rule and the other an exception
from the meeting series.

The new Sync::Source::ical20::testLinkedItems test covers
various different operations involving such two related VEVENTs
(adding in arbitrary order, updating/deleting one or both events, etc.).

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@24122 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:28 +01:00
Patrick Ohly
693e226f3f fixed compiler warnings in header files (found by g++ -Wall when compiling client)
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@23258 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:28 +01:00
Andrea Toccalini
90eb9f7132 updated license to AGPL
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/branches/b_v65/3x/client-api/native@21417 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:25 +01:00
Patrick Ohly
73eff8c05e make update() utility function a bit more flexible: the checking stage is optional now
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17611 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:24 +01:00
Patrick Ohly
3f95bf1734 made it possible for clients to not just configure existing tests, but also add their own ones
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17602 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:24 +01:00
Matteo Vitolo
66e4de9766 copyright updated
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@17292 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:23 +01:00
Patrick Ohly
329c543e13 updated Doxygen documentation about client testing
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@16044 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:21 +01:00
Patrick Ohly
f3d7fe1733 pass the sync result to CheckSyncReport so that it can be taken into account when checking the result
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@15792 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:20 +01:00
Patrick Ohly
02333c6b39 first draft of API documentation via Doxygen
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@15371 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
b97d0be337 fixed compilation if --enable-unit-tests is used without --enable-integration-tests
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14903 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
2f69d6ba94 - added checking of the SyncReport - changed expectations for refresh-from-server sync: number of deleted items depends on SyncSource implementation and cannot be checked - make LOCATION unique in calendar events to avoid having events merged by Funambol server
=> testing passed with Funambol 3.0 using:
   CLIENT_TEST_DELAY=5 \
   CLIENT_TEST_LOG=/scratch/Funambol/ds-server/logs/funambol_ds.log \
   CLIENT_TEST_SOURCES=vcal10,vcard21 \
   CLIENT_TEST_SERVER=funambol \
       ./client-test Client::Sync::vcal10_vcard21

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14292 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:19 +01:00
Patrick Ohly
cca9cd3c13 - added vcard21/vcal10 for Funambol 3.0 server - server URI is now set automatically when creating client config; works for vcard21/vcal10 with Funambol 3.0 and vcard30/ical20 with ScheduleWorld
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@14183 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:18 +01:00
Patrick Ohly
f89bdcb76f sync tests now work on Linux: - implemented sync() method using FILESyncSource - clarified naming of clients and different change tracking
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@12301 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:17 +01:00
Patrick Ohly
a3137b52e7 Added real sync testing, using RawFILESyncSource to store items locally. Compiles and runs on Linux, but tests mostly fail because FILESyncSource supports no change tracking yet.
See test/client-test.cpp as an example how the existing tests can
be hooked up with other SyncSource implementations. The sync() function
still needs to be implemented.

git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@12093 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:16 +01:00
Patrick Ohly
ccedc74a64 finished porting all tests from SyncEvolution test suite, improved log file handling
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11864 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:16 +01:00
Patrick Ohly
ff6dc24714 finished local tests
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11805 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:15 +01:00
Patrick Ohly
768464c846 added a C++ client test framework, moved test runner to new 'test' directory
git-svn-id: https://core.forge.funambol.org/svn/core/top-level/trunk/3x/client-api/native@11726 e8e8ed6c-164c-0410-afcf-9e9a7c7d8c10
2009-03-25 14:43:15 +01:00
Patrick Ohly
04a2d94c4a tests: removed in preparation for importing complete history
The branch 'Funambol' contains code developed by Patrick
Ohly in the Funambol Subversion repository and contributed
to Funambol as part of the Funambol Contributor Agreement.

It will be merged back into the SyncEvolution repository,
which is allowed by that agreement because

   Funambol grants to you [the contributor] a non-exclusive, perpetual, irrevocable, worldwide, royalty free,
   transferable copyright license to reproduce, prepare derivative works of, distribute
   (internally and externally, in object code and, if included in Your Contributions, source
   code form), use, publicly perform and publicly display Your Contributions, with the right
   to sublicense all of these rights through multiple tiers of sublicensees.
2009-03-12 17:10:48 +01:00
Patrick Ohly
3b88d491c8 enable those linked item tests that 'dumb' sources can pass
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@735 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-18 20:31:37 +00:00
Patrick Ohly
d4cd8002ce calendar synchronization with Evolution Exchange Connector works again
CALOBJ_MOD_THIS for parent items caused problems. A *long* delay after
a sync was needed, otherwise the Connector returned garbage during
further accesses (e.g., old child event instead of the updated one).

Some code cleanup (creating ItemID from LUID).

Temporarily forked the client test (introduced update items for child/parent,
relaxed semantic selectable at runtime).


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@719 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 07:34:17 +00:00
Patrick Ohly
58a96aa60d copied r_v70ga from C++ client lib because some changes will be necessary
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@718 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 07:31:55 +00:00