Commit graph

2941 commits

Author SHA1 Message Date
Patrick Ohly
9286d914c0 EDS: workaround for D-Bus method timeouts (BMC #4026)
libecal/ebook implementation based on D-Bus (Evolution >= 2.30)
inevitably will run into D-Bus timeouts as the amount of data
increases.

This patch moves an earlier hack written for Maemo into the core
code and enables it by default, if the EDS backends are active.
It works by intercepting dbus_connection_send_with_reply()
and substituting timeout_milliseconds==-1 ("default timeout
of 25 seconds") with timeout_milliseconds=INT_MAX ("no timeout").

Setting SYNCEVOLUTION_DBUS_TIMEOUT to number of milliseconds
allows controlling the final timeout value.
2010-09-03 15:40:05 +02:00
Patrick Ohly
a5e6f4840b evo.supp: updated suppressions for libical (BMC #6275)
valgrind suppressions for upstream libical. Similar to what we
had there already. Still need to investigate and report this upstream.
2010-09-03 11:27:50 +02:00
Patrick Ohly
9a9a2574eb nightly testing: adapted synccompare to mkcal
mkcal showed a difference in Client::Source::ical20::testImport
which can be ignored:
- CLASS=PUBLIC is the default, doesn't have to be there
2010-09-02 14:38:12 +02:00
Patrick Ohly
44ef5a385b nightly testing: log report generation functions
Instead of calling os.system() directly, use "runCommand()". That logs
the command to stdout and checks the result.
2010-09-02 13:49:24 +02:00
Patrick Ohly
b715ba1601 nightly testing: reorder columns so that valgrind and overall result come first
The tables got fairly large, requiring scrolling to see the real information
(overall success and valgrind errors). This patch moves these columns to the left
where they are visible by default.
2010-09-02 13:49:24 +02:00
Patrick Ohly
5a4c91382c nightly testing: added a column for "network failure"
This column is useful to determine at a glance whether tests
failed because of something outside of our control. The value
is also shown for each single test.
2010-09-02 13:48:46 +02:00
Patrick Ohly
97426b498e nightly testing: disable testDeleteAllRefresh for Google
The test depends on "refresh from client" semantic, something that
Google doesn't support.
2010-09-02 13:48:22 +02:00
Patrick Ohly
d20cbf9428 nightly testing: only include services in report which actually were active
The code added all services to the list which it encountered, including
those which were disabled and thus got skipped during testing. This
artificially increased the size of the report; not even sure whether
this was intentional. Now only active services are added.
2010-09-02 13:48:05 +02:00
Patrick Ohly
856e291844 Nokia phones: alarm times in UTC, sending PHOTO (BMC #1657, #5860)
Introduced a new remote rule for all devices made by Nokia. In that
rule, we set certain defaults which turned out to be useful for
a variety of existing phones:
- send alarm times in UTC (BMC #1657)
- ignore the incorrect 256 bytes size limit for PHOTOs
  and other properties (BMC #5860)

Should a specific model require different values, then a rule for
it after the initial 00_nokia.xml can override the defaults.
2010-09-01 18:44:02 +02:00
Patrick Ohly
b7d9f26f69 nightly testing: fixed caching of Evolution sources (BMC #5864)
"text" stands for Evolution memos and depends on
EvolutionCalendarSource. Added.

The name lookup differs for local and for sync indices, must do
the name lookup before calling checkEvolutionSource(). Fixed.
2010-09-01 18:05:27 +02:00
Patrick Ohly
19f703588f nightly testing: avoid shutdown issues due to caching Evolution sources (BMC #5864)
Destroying ORBit based Evolution backends at the very end of the
process life time caused assertions in ORBit. Added explicit cleanup
code which is called before triggering the normal library shutdown by
leaving main().
2010-09-01 18:01:19 +02:00
Patrick Ohly
b6e11b7652 KCalExtended: use "mkcal" as generic type name
Follow the KCalExtended -> mkcal rename. KCalExtended is
still accepted as an alias.
2010-09-01 16:06:16 +02:00
Patrick Ohly
815ca3fa98 KCalExtended: adapted "update" code patch to new API
The code had not been updated yet. To get it to compile,
a work around for BMC #6181 (upcasting to IncidenceBase)
was needed.
2010-09-01 16:03:47 +02:00
Patrick Ohly
7071f941cd command line: use % as escape character for luids
The command line, like a lot of other code, used the escape/unescape
code in SafeConfigNode. For historic reasons, that code used ! as
escape character, which is awkward for the command line, because
that is a special character.

Instead of further overloading the SafeConfigNode, this patch moves
the escape/unescape code into its own utility class. This is the
cleaner approach anyway. It also adds unit testing for the code.

All other users of the old code are updated. Care must be taken here
to not accidentally switch to a different escape mechanism, because
the mechanism must remain compatible with the old implementation.
2010-09-01 15:59:48 +02:00
Patrick Ohly
21f76cff07 command line: code clean-up around LUID escaping
Using std::string for both local IDs as respresented by the backend
and encoded as printed by the command line was confusing. It didn't
help that the m_luids member contained encoded strings, instead of
normal luids.

This patch introduces a dedicated class which holds an encoded luid,
and provides the necessary conversion functions. m_luids now really
contains plain luids, so its values can be passed to the backends
directly.
2010-09-01 15:48:29 +02:00
Patrick Ohly
8b6302badc Merge branch 'master', remote branch 'origin' 2010-08-31 10:09:44 +02:00
Patrick Ohly
96722196ef nightly testing: allow enabling valgrind for "prebuilt" test (BMC #1007)
--enable evolution=foo parameters are used for --enable prebuilt-bar,
but without also enabling native Evolution tests.
2010-08-31 15:52:47 +08:00
Patrick Ohly
2ab93b301f KCalExtended: fix for invalid memory access
Accessing pointer into temporary instance is only valid inside
the expression. Need to copy into result std::string right away.
2010-08-31 10:02:17 +02:00
Patrick Ohly
4db5fc14b6 testing: fixed "make dist" issue
The new templates had not been included in file list...
2010-08-30 16:29:36 +02:00
Patrick Ohly
9e55780cdc QtContacts: more QtContacts API related fixes (BMC #5710)
First, "query-builder=fetch,save" is obsolete.

Second, the modification time stamp is not updated in
saved contacts. Instead it has to be fetched explicitly
in a second request. This behavior is currently under
debate because it is not quite consistent with some of
the API documentation.
2010-08-27 13:30:05 +02:00
Patrick Ohly
bd32d1faa9 syncevo-phone-config: set consumerReady in output (BMC #3803)
None of the config templates added to the wiki contain the "consumerReady"
flag. Therefore they don't show up in the sync-ui once a user follows the
instructions for downloading them.

The tool now adds the flag automatically, because a user who downloads
the template does so in order to use it, regardless whether it is
ready or not (which we haven't defined anyway for phones).
2010-08-27 13:30:05 +02:00
Patrick Ohly
fa9c4c6bb9 phone templates: updated, copied from syncevolution.org Wiki (BMC #5727)
Merged all Nokia templates (S40, S60, Maemo) into one, because the
settings were the same anyway. The rationale is that it reduces the
number of options the user has to choose from.

Added Sony Ericsson, based on K750i.

Added names of working phones based on Wiki entries.
2010-08-27 13:30:05 +02:00
Patrick Ohly
614f0390b0 nightly testing: workaround for Evolution 2.30 storage shutdown (BMC #5864)
The D-Bus based Evolution Data Server calendar and contact daemons
(e-calendar-factory and e-contact-factory) shut down after 10 seconds of
inactivity.

Normally libecal/libebook detect that, but not when the client only uses the
synchronous API ("destroyed" signal not delivered, see e-cal.c). That affects
SyncEvolution.

This patch ensures that a EvolutionContactSource resp. EvolutionCalendarSource
remains open throughout the lifetime of the client-test app. This prevents
the storages from shutting down.

This instances are created on demand and deleted when the process quits.
This might be too late for ORBit based Evolution; there were error messages
after all tests succeeded and an assertion failure in ORBit, leading to
a nonzero return code.
2010-08-27 18:47:16 +08:00
Patrick Ohly
2353ee20ba evo.supp: added suppressions for Evolution 2.30 (BMC #1007)
With these suppressions, valgrind reports no problems when
running on Debian Testing. valgrind 3.6 was necessary to
avoid reports about glibc.
2010-08-27 18:44:12 +08:00
Patrick Ohly
a00cabeafe D-Bus API: fixed type signature
a{s} needs to be a(s); broke compilation of GTK GUI.
2010-08-25 23:09:28 +02:00
Patrick Ohly
1b243b7b83 D-Bus API: added Server.ConfigChanged signal (BMC #3558)
Watching for configuration changes (e.g., for refreshing the list of
servers in the GUI) currently is a bit cumbersome. It requires
watching for SessionChanged, request GetConfigs, and look if
the configs have changed. This is not really a problem, but it
might be more convenient to get notifications about config
changes directly.

This patch introduces a Server.ConfigChanged signal which is at the
end of a session if and only if it modified (removed, updated, added)
a config. This includes the Session.SetConfig() as well as command
line operations executed inside the server.

Testing the signal can only proof that it is emitted. Checking that it
is not emitted would have to block waiting for something, and it is
uncertain what that should be. SessionChanged may be emitted before
the ConfigChange signal and thus isn't suitable.
2010-08-25 23:09:28 +02:00
Patrick Ohly
a9e7a49705 D-Bus API: added Session.GetConfigName() (BMC #3559)
This call is useful for clients which haven't started the session
and need to know what peer it relates to, and also fo clients which
use non-normalized config name and need to know the normalized name.
2010-08-25 23:09:22 +02:00
Patrick Ohly
e30ae98e57 D-Bus API: added suppression of libnotify notifications (BMC #3560)
Genesis is already providing feedback about running syncs and thus
wants to suppress the notifications generated by syncevo-dbus-server
for it. With this patch it is possible.

This patch removes the m_attachedClients member and moves the attach
count into the Client class. The reason is two-fold:
a) m_attachedClients was simply redundant
b) entries were not removed (bug in the control flow of clientGone:
   if the client was found, which is always the case for any attached
   client, it returned without calling detachClientRefs())

The other new entry in Client is the boolean setting whether that
client wants to suppress notifications. If any client disables them,
they are disabled globally.
2010-08-25 23:09:14 +02:00
Patrick Ohly
4fad1303ae command line: start D-Bus session with "no-sync" flag unless running a sync (BMC #3562)
The main goal of the new D-Bus API is to avoid unnecessary (and incorrect)
updates in Genesis when running non-sync sessions with the command line.
This patch sets the flag accordingly to achieve this.

Note that the modified command line now fails with
org.freedesktop.DBus.Error.UnknownMethod when running against an old
syncevo-dbus-server. There's no fallback to the older StartSession
method. This shouldn't be necessary because the command line is shipped
with the server.

Just in case an INFO message is printed when the method is found to
be missing.
2010-08-25 11:07:51 +02:00
Patrick Ohly
5e219fedef D-Bus API: added Server.StartSessionWithFlags() and Session.GetFlags()
Clients like Genesis would like to know for which purpose a session
was created. If it was for changing the configuration, they can ignore
the session.  If it was for sync, then progress and result should be
displayed.

Starting a session with the new "no-sync" flag in the new
StartSessionWithFlags() achieves that. Note that it is up to the
clients to provide that hint; currently none of the clients do that.
2010-08-25 10:37:58 +02:00
Patrick Ohly
c7be6f1c49 test-dbus.py: fixed Python syntax error in last commit
Single quotation marks inside the string terminated the string
prematurely.
2010-08-25 10:30:24 +02:00
Patrick Ohly
502cdec73a gdbus C++: fixed cut-and-paste error
Found this one when adding a method with five parameters. The
boost::bind() call had the wrong number of parameters for that case
and thus compilation failed.
2010-08-25 10:26:49 +02:00
Patrick Ohly
a28eefa300 command line: do sanity version check when running as D-Bus client
One common mistake among developers is that they recompile SyncEvolution
and then run with the system's D-Bus server. This patch adds an INFO
message about such a version mismatch, but does not abort because such
a combination may be intentional.

It is implemented as part of the attach process: as soon as attaching
was successful, fire of another asynchronous method call to the new
Server.GetVersions() instead of returning from the main loop. Once
that completes, check the version and return.
2010-08-25 08:52:54 +02:00
Patrick Ohly
067397a9f2 D-Bus: added Server.GetCapabilities and Server.GetVersions (BMC #3563)
We are about to extend the D-Bus API. Clients need some way of determining
whether the new features are available. A strict numbering of the API is
inflexible, so let's use "capability" strings instead. Also add flexible
version querying, for debugging.
2010-08-25 08:52:54 +02:00
Zhu, Yongsheng
c8b1f3a07d client-test: avoid duplicate sources in m_localSource2Config
do checking to avoid duplicate before pushing back a source
into m_localSource2Config for TestEvolution.
Virtual sources may contain many sub-sources, which might duplicate
other sources.
2010-08-25 08:41:18 +02:00
Zhu, Yongsheng
5e864b8c65 test-dbus.py: adapted to modified 'message type' error description 2010-08-25 08:39:35 +02:00
Patrick Ohly
38bd41deb4 test-dbus.py: removed ZYB, it is no longer supported 2010-08-24 21:35:31 +02:00
Patrick Ohly
1b62240708 command line: allow creating contexts without peers
When configuring a context for local sync, no peer is needed
inside that context. Therefore "--configure" without "--template"
is valid, because the templates only differ in peer-specific
properties.

This patch uses the "SyncEvolution" template as automatic fallback
for context configs. A change to FileConfigTree ensures that the
"peers" directory is created, as expected by the code which checks
for new-style configs.
2010-08-24 09:36:15 +02:00
Patrick Ohly
abbfc49676 SyncConfig: do not mistake "foo" context for old-style "foo" client config
A existing context configuration could accidentially be access without
the @ sign and then was treated like an old-style config with default
context. During --configure, invalid properties from the @default
context were written into the other context.

The fix makes the check for old-style configs more strict: it assumes
that all new-style contexts have a "peers" sub directory and checks
for that.
2010-08-24 09:36:05 +02:00
Patrick Ohly
a3eaf3138b command line: fixed --delete-items/--import for KCalExtended
The --delete-items/--import options did not work with the KCalExtended
backend. The reason was that saving changes is only done in
KCalExtendedSource::endWrite(), which wasn't called because the command
line did not invoke endDataWrite().

That used to be intentional to avoid updating change tracking state in
other backends, but clearly was a hack. Because the sources are now
instantiated without change tracking, endDataWrite() is safe to call,
which fixes the issue with KCalExtended.
2010-08-23 18:20:01 +02:00
Patrick Ohly
bf36c6b7e6 KCalExtended: further adaptions to KCalExtended API change
Must use MemoryCalendar because ExtendedCalendar can no longer
hold incidences without a Notebook UID, which does not exist
without a storage.

Removed a redundant smart pointer copying.

Added return code checking of iCalendar 2.0 parser.
2010-08-23 18:17:24 +02:00
Patrick Ohly
155a349014 runtests.py: make repos group-writable
The usage model for the nightly repos is that the "nightly" user
updates them and other users modify them to try out changes before
committing them. This relies on group-writable repos.

Despite umask 0002 and drwxrwsr-x permissions of the work area
this didn't work, group only had read permission. This patch adds
an explicit chmod and sets "sharedRepository = group" to fix this
after a fresh clone.
2010-08-23 10:44:50 +02:00
Patrick Ohly
4a52bd669f runtests.py: avoid ssh access to gitorious.org in nightly checkout
The nightly test account only has anonymous read access to
gitorious.org via the git:// protocol. But for normal users
patching the files, access via ssh is needed to commit changes.

Work around this by temporarily patching the URL for origin.
"git remote set-url" would be more elegant than Perl, but
only recent git versions have that.
2010-08-23 10:10:59 +02:00
Patrick Ohly
b504bf9f1f KCalExtended: workaround for incomplete libmkcal.pc
libmkcal.pc did not depend on libkcalcoren and thus
include paths were not set for that when only checking
for libmkcal. Drawback now is the hard dependency on
the MeeGo version of libkcalcore.
2010-08-17 13:45:10 +08:00
Patrick Ohly
4e87e50463 EDS compatibility: added icalproperty_free()
Started to use this call recently, also need to wrap it.
2010-08-17 11:30:39 +08:00
Qiankun Miao
2265aaff0c EvolutionBackend: fix memory leak
Function "icalcomponent_remove_property(...)"  removes property instance from
properties list, but doesn't free the space it holds. So, after calling this
function, the property instance removed from properties list should be free
explicitly.
2010-08-16 16:38:19 +08:00
Patrick Ohly
957d5c6175 Merge branch 'meego-1.0'
Conflicts:
	configure-pre.in

Version conflict.
2010-08-15 21:29:08 +02:00
Patrick Ohly
2018114977 gdbus: ensure that header files are included in "make dist"
After commenting out the files, they were no longer considered
by automake.
2010-08-15 21:26:53 +02:00
Patrick Ohly
c01fe2bf67 gen-autotools.sh: fixed ambiguous HEAD reference
"git show-ref HEAD" prints all refs containing HEAD. Sometimes there
were more than one. What we want is .git/HEAD, which "show-ref" seems
to know nothing about ("git show-ref --verify HEAD" fails).

Fixed by using the content of ".git/HEAD". Links are resolved by
removing the "ref: " prefix in it.
2010-08-15 21:24:14 +02:00
Patrick Ohly
5b6f3ae3ca kcalextended: adapted to revised API
As part of splitting kcalextended into a modified kcalcore (shared
with KDE) and mkcal (MeeGo), the API was modifid. This patch gets
SyncEvolution to compile again. However, at least on my laptop
it then crashed at runtime inside Qt before even calling mkcal =>
change untested.
2010-08-15 21:24:14 +02:00