Commit graph

174 commits

Author SHA1 Message Date
Patrick Ohly
2cdf3916dc Merge branch 'master' into ui 2009-05-07 12:18:14 +02:00
Patrick Ohly
016a30ac95 EvolutionMemoSource: notes with only a summary were not sent correctly
Instead of sending the summary, only the empty description was sent.
Now the summary is sent. This has the effect that on a full round-trip,
the summary gets duplicated as part of the description. synccompare
was adapted to not complain about this for the newly added testcase
for this: the script also duplicates the summary.

This cannot be avoided because notes are exchanged as plain text
which cannot distinguish between summary and description.
2009-05-05 11:37:51 +02:00
Patrick Ohly
513a58c004 testing: check for correct server behavior during refresh-from-client
During a refresh-from-client sync, the server has to delete all items
that it currently has before adding those sent by the client. This
new test covers that. It complements the testRefreshSemantic test,
which did that for the other direction and thus was renamed to
testRefreshFromClientSemantic.

The server also needs to tell other clients to delete the items
that were deleted this way during a refresh-from-client. This is
not currently tested.
2009-05-02 11:32:18 +02:00
Patrick Ohly
d7a2d4ce8e Merge branch 'master' into ui 2009-04-30 18:44:59 +02:00
Patrick Ohly
3217ac8630 license: merged LGPL v2.1 -> LGPL v2.1 + v3 change
Followed the license change applied to the upstream content
and applied the same LGPL v2.1 + v3 license to content
created at Intel.
2009-04-30 18:35:56 +02:00
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
3cde4013dd synccompare: each of the two parameters can refer to a directory of items in addition to plain files
A directory is treated exactly like a file by concatenating all files inside
the directory and then working with the resulting text.
2009-04-22 14:25:01 +02:00
Patrick Ohly
54cb54b8e8 testing: the "New York" test case works again
This depended on VTIMEZONE before VEVENT (because that is
what ScheduleWorld needs). Since Synthesis supports this now,
the test can be enabled again.
2009-04-16 14:42:58 +02:00
Patrick Ohly
e1f2e694f2 ical20 todo: added support for URL and PERCENT-COMPLETE
Added two new fields to the XML configuration and updated the
test case. Also switched to a time zone which doesn't get mangled.
2009-04-01 17:20:27 +02:00
Patrick Ohly
ef11945687 testing: 'text' was incomplete
Comparison was missing altogether. Items were not imported as text/calendar
because the type wasn't set. Creating new items didn't work because <<REVISION>>
was in the wrong place: it needs to be in the DESCRIPTION, so that SUMMARY and first
line of DESCRIPTION remain identical (expected by some peers and our own sync source).
2009-04-01 16:46:55 +02:00
Patrick Ohly
192c2fe37f testing: disable interrupted sync testing temporarily
This depends on suspend/resume support, which we don't have yet.
2009-04-01 15:31:53 +02:00
Patrick Ohly
c859703850 testing: ignore -(Standard) suffix in TZID
Evolution 2.24.5 adds this. It can be ignored because we are not
sending it out like that (Synthesis engine matches it against the
imported libical time zones, which don't have this suffix), thus
our peers won't have a problem with it.
2009-04-01 12:32:27 +02:00
Patrick Ohly
0a8658d23a vcard: added X-MOZILLA-HTML support
This is currently stored as a simple string in the field "WANTS_HTML".
A boolean field would be nicer, but isn't available.
2009-03-31 21:41:00 +02:00
Patrick Ohly
f13307ac52 testing: fixed wrong summary of daily repeating event
The summary incorrectly claimed that the event recurred weekly.
2009-03-31 17:52:54 +02:00
Patrick Ohly
bf4c7721c0 testing: simplified ical20 test cases for Synthesis engine
The Synthesis engine transforms COUNT into UNTIL clauses. This
is semantically not quite the same, but for viewing the events the result is
identical (verified in Evolution).
2009-03-31 17:50:29 +02:00
Patrick Ohly
f75037e67f HTTP transport: check reply content type
Instead of passing an invalid reply into the Synthesis engine where
it triggers an obscure (WB)XML parser error in the SyncML Toolkit,
check the content type and dump a non-(WB)XML reply into our own log,
then abort with a "transport failed" error.

libsoup already aborted because of the non-200 server status. Now it
also dumps the message in that case.
2009-03-31 15:34:49 +02:00
Patrick Ohly
323b1b35df testing: removed 'New York' test case
The Synthesis time zone handling has some issues with this. The 2006
rule set is detected, but then replaced by the different 2007 rule
set.

Reported to Synthesis, removing the test case in the meantime.
2009-03-30 17:24:34 +02:00
Patrick Ohly
50a3c965c7 testing: removed 'recurr at end of month' test case
Recurrences relative to end of week/month/year are not supported by Synthesis.
2009-03-30 15:51:46 +02:00
Patrick Ohly
b8598afe55 Revert "testing: simplified test cases"
This reverts commit dd22cd12d4.

The original test cases can be restored because libsynthesis now
knows about libical time zone definitions and preserves then.
Some of the other Evolution specific tests are not supported yet;
those will be simplified separately.
2009-03-30 15:47:24 +02:00
Patrick Ohly
fa3dcb756a testing: fixed invalid memory access when printing empty log prefix 2009-03-27 16:17:55 +01:00
Patrick Ohly
25a8502a4b copyright updated
update-copyright.sh can be used to add copyright remarks for the current
year. It finds the authors who made a change in each file and adds/updates
their copyright remark. Intel employees are grouped under "Intel Corporation".
2009-03-25 15:21:04 +01: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
7a9522767a testing: use separate EXDATEs as normal form
The previous approach did not sort values. It was inefficient (multiple s// passes).
With multiple EXDATE properties it is also easier to find added/removed ones.
2009-03-25 14:43:54 +01:00
Patrick Ohly
dd22cd12d4 testing: simplified test cases
Bugzilla 1334 and 1336 trigger item rewriting which is okay, but
shows up in the automated testing as failure:
- different time zone definitions
- RRULE UNTIL->COUNT

That's okay, but to avoid the automated test failure I replaced
the test cases with the output of testConversion. Revert this
when the issues above are solved in a better way!
2009-03-25 14:43:53 +01:00
Patrick Ohly
09113b0480 testing: removed obsolete X-EVOLUTION-ENDDATE parameter 2009-03-25 14:43:53 +01:00
Patrick Ohly
fb13e3d2af testing: remove default VALUE=DATE and join multiple EXDATE values 2009-03-25 14:43:53 +01:00
Patrick Ohly
27623b6c8c testing: ignore difference due to different order of RRULE value subcomponents
Evolution itself seems to have changed the order (testImport) and
Synthesis also does it differently; both is okay, the order doesn't matter.
2009-03-25 14:43:53 +01:00
Patrick Ohly
2f6a2ad337 testing: print sync name to give feedback while each sync test runs 2009-03-25 14:43:52 +01:00
Patrick Ohly
af81e81aca synccompare: normalize case of mailto: in ATTENDEE and ORGANIZER
The standard probably says it's case insensitive.
2009-03-25 14:43:51 +01:00
Patrick Ohly
c6606b9482 iCalendar 2.0 testcases: converted to CRLF as required by standard 2009-03-25 14:43:51 +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
636c1fb22c vcard: removed special ADR TYPE=PARCEL handling
This used to be necessary because Evolution created TYPE=OTHER,
which is non-standard. Now this type is removed by the Synthesis
decoder/encoder.
2009-03-25 14:43:51 +01:00
Patrick Ohly
6b19b0ca0b normalize values which look like a date to YYYYMMDD
This is necessary because the Synthesis encoder doesn't
insert the optional hyphen.
2009-03-25 14:43:50 +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
92d6ac11aa testing: nicer printing of before/after comparison
Use the ClientTest::compare() helper function and change it so that
it invokes "synccompare", as needed when using it in SyncEvolution.
Improved it so that it prints the synccompare command after a failure
and adds a line break before it.
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
90cfb6b702 testing: when catching a CppUnit exception after a sync, report the original error instead of 'unexpected exception' 2009-03-25 14:43:48 +01:00
Patrick Ohly
642585610b testing: print CPPUnit failures directly after each failed test 2009-03-25 14:43:47 +01:00
Patrick Ohly
9c38b5c034 compiler warnings: check result of log writing 2009-03-25 14:43:47 +01:00
Patrick Ohly
dc38ab0ee9 compiler warning: brackets around && in || 2009-03-25 14:43:47 +01:00
Patrick Ohly
d71a296525 dist: fixed distcheck, bundle Synthesis
When --with-synthesis-src is used, then the Synthesis source code is compiled
automatically and included in a .tar.gz.

Added some missing EXTRA_DIST files.
2009-03-25 14:43:44 +01:00
Patrick Ohly
0262e2bfd2 HTPP: set user agent string again 2009-03-25 14:43:44 +01:00
Patrick Ohly
c36531b37b testing: silence diffs by enabling Synthesis suppressions 2009-03-25 14:43:44 +01:00
Patrick Ohly
b767004bc8 testing: relaxed testLinkedItemsInsertBothUpdateChild/Parent
A sync source may also report the other item as updated.
Sometimes it is not possible to update one without touching the other.
2009-03-25 14:43:42 +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
52ed0258d3 testing: one log file is created per test
The file is named after the current test, with : replaced by underscores.
This gets all log message outside of sync sessions. Those are still written into
separate files whose name needs to be adapted.
2009-03-25 14:43:36 +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