Commit graph

2088 commits

Author SHA1 Message Date
David Bremner
032dfb07a7 fix distribution in changelog 2010-01-23 13:03:17 -04:00
David Bremner
05dedd663e update installed files for new upstream version 2010-01-21 08:51:52 -04:00
David Bremner
b6521fec0e Bump dependency on libsynthesis to new (moblin) version 2010-01-20 06:33:23 -04:00
David Bremner
11a96879c5 New upstream version (alpha release) 2010-01-17 22:16:00 -04:00
David Bremner
134a88c85d Merge remote branch 'alioth/master' 2010-01-17 22:04:43 -04:00
David Bremner
f4b670c39d Merge branch 'upstream' 2010-01-17 21:59:08 -04:00
Patrick Ohly
176a9a1a0d autotools + GTK GUI: added sync-config-widget.c to PO files
sync-config-widget.c contains translations, but wasn't listed
as input file for translation. Found by distcheck.
2009-12-02 18:19:13 +01:00
Patrick Ohly
ca651228bb autotools + D-Bus API: must include the new .xml and .xsl files
Without that, the sync-ui cannot be built from distributed
sources.
2009-12-02 18:11:25 +01:00
Patrick Ohly
0bd22968ec NEWS + configure: SyncEvolution 1.0 alpha 1 snapshot
Also updated section on 0.9.2, needs to be backported.
2009-12-02 17:19:29 +01:00
Jussi Kukkonen
bb06e0ba01 gtk-ui: make sure we only sync once whe nasked
Two bugs fixed here:
1. status handler could potentially be called several times with "idle"
2. the StatusChanged handler did things differently from GetStatus
2009-12-02 17:18:00 +01:00
Patrick Ohly
b132b94402 CheckSource(): did not handle invalid or missing "type" property (MB #8317)
An invalid type (like inactive backend, or something the user
entered into the file manually) raises an exception when accessing
the source parameters. This exception must be caught and transformed
into the SourceUnusable exception expected by D-Bus clients.

An unset type leads to a NULL SyncSource pointer. This was checked,
but without raising an exception. CheckSource() thus incorrectly
reported success.
2009-12-02 15:08:13 +01:00
Jussi Kukkonen
a175f8e43c gtk-ui: use defaultPeer config value on startup
Also remove gconf dependency from client, this was the only yhing
it was used for
2009-12-02 13:57:12 +01:00
Patrick Ohly
086308e6ec SoupTransportAgent + syncevo-dbus-server: avoid segfault when aborting (MB #8385)
Shutting down a sync session because of user-requested abort does not
cancel pending messages, because that would be allowed to block. Instead
the transport agent is destructed.

The SoupTransportAgent did not cancel the pending message and
therefore callbacks for a stale instance of it were invoked later on
*if* the main loop was activated again. This can only happen in the
syncevo-dbus-server, not the command line.
2009-12-02 11:49:19 +01:00
Zhu, Yongsheng
108bcf3bf3 DBus server: apply temporary configs (MB#8116)
Apply temporary configs when calling other APIs
of sessions. This makes configs that users temporarily
set affect other APIs.

All sources filters in m_sourceFilters must be set
to config not only for existing sources in config but also
for non-existing sources. This could help users temporarily
do some operations without flushing any configs.

Currently affected APIs are Session.CheckSource,
Session.GetDatabases, Session.GetConfig, Session.Sync.

Also add 3 unit tests for CheckSource, GetDatabases
and GetConfig to test the temporary config is in
effect for them. They all are passed.
2009-12-02 15:42:50 +08:00
Zhu, Yongsheng
65d40441df SyncConfig: return sources in shared, peer and filters for getSyncSources
'getSyncSources' of SyncConfig only returns shared sources
in shared layout and peer sources in other layouts.
Peer sources must also be included in shared layout. Moreover,
new sources in sources filters should be taken into consideration.
It should return an union of:
1. contextpath/sources
2. peers/[one-peer]/sources
3. sources in sources filter
2009-12-02 15:39:56 +08:00
Zhu, Yongsheng
732bd2d586 DBus testing: add unit tests for status and progress
Implement 3 unit tests for status and 1 unit test for
progress. For status,
1) test a full status list when a sync is executed
This is checked in TestSessionAPIsReal.testSync
2) test status when session is aborted
3) test status when session is suspended
For progress, test progress number is increasing
when a sync is executed. Also combine this check in
TestSessionAPIsReal.testSync

It is necessary to specify own signal receivers in
subclasses of DBusUtil to let them add new operations.
Two methods "progressChanged" and "statusChanged" are
added in DBusUtil. They are called when handling
statusChanged and progressChanged signals in setUpListeners.
By checking progress in "progressChanged", we can
make sure that aborting or suspending takes place when
sync is running.
2009-12-02 15:17:22 +08:00
Zhu, Yongsheng
d7d67621a9 DBus server: only flush status when changed for SESSION_END
SESSION_END always flushes status no matter whether
there is any change of status. It will duplicate
status and send them to dbus clients.
Only send StatusChanged signal when there is a change
of status.

This problem was found by the unit test which will
check any two adjacent statuses should not be the same.
2009-12-02 15:17:15 +08:00
Zhu, Yongsheng
bb2b35b4c1 DBus server: set 'running' status in Session.run
The status 'SYNC_RUNNING' should be set firstly
in Session.run instead of setting it when
SESSION_START event is reported. This could mislead
dbus clients.
2009-12-02 14:42:52 +08:00
Zhu, Yongsheng
2cfd2fa52d DBus testing: remove one obsolete unit test for GetReports
One unit test for GetReports is dependent on a real
sync. Since a new full test by reference directory tree
is enabled, this unit test is removed.
2009-12-02 14:42:52 +08:00
Patrick Ohly
5b72993ad0 autotools + deb: removed dependency on doc_pak
That was left over from before the introduction of our
docdir usage inside "make install". doc_pak is gone now.
2009-12-01 22:03:07 +01:00
Patrick Ohly
210a2656f7 nightly testing: git fetch fixes
Instead of fetching a specific repo, use just "git fetch" to
pull updates into an existing repo. Specifying the repo
should have worked, but apparently is not done correctly (not
yet?) by the git in Debian Stable.

Using "git fetch" assumes that the URL of the repo does not
change between updates. That should be the case for us.
2009-12-01 21:45:34 +01:00
tester
2d0da511f0 test/runtest.py: git checkout debugging
Added both 'set -x' and 'git show-ref' to get more information
because it seems that sometimes the latest source is not checked
out.
2009-12-01 21:45:34 +01:00
Chen Congwu
d24433e06d Testing: result check
Do not grep 'valgrind' because 'valgrind' is not guranteed to run
2009-12-01 21:45:34 +01:00
Chen Congwu
ed099f8413 Testing: A special case set has slightly differnt case name 2009-12-01 21:45:34 +01:00
Chen Congwu
40470e6ec6 Testing Result Check: check "okay" instead of "fail" because of possible crash
Now the check criteria is:
"sourcename::casename: okay \*\*\*"
if the string is not present, the test result will be failed.
2009-12-01 21:45:34 +01:00
Chen Congwu
9391fcdca9 Testing result checker: change the result checker grep criteria
The grep criteria to check the test result did not work for tests with
 combined source.
2009-12-01 21:45:34 +01:00
Patrick Ohly
70329670bf runtests.py: run setup command twice, just to be sure
In a setup where it was run inside schroot we got error
messages from schroot because gconfd got stuck and prevented
a clean unmount of /tmp. Even "kill -9" wouldn't get rid of
such a hanging gconfd.

As a workaround, running the setup command twice seems to
succeed, including getting rid of the handing gconfd.
2009-12-01 21:45:34 +01:00
Chen Congwu
41d312c6f2 Testing: fix some issues for prebuilt test
1) use string.partiton instead of split
2) change to a proper dir if srcdir is not existed
2009-12-01 21:45:34 +01:00
Zhu, Yongsheng
ca5a4d76f4 Testing: clean log/test files before a new testing
Previously do cleanup operation after implementing
a syncevolution setup. But if this setup raises
exceptions, we might get incorrect test results.
so clean all these files before doing any other
preparations
2009-12-01 21:45:34 +01:00
Chen Congwu
f76c20fa78 Testing: show evolution-prebuilt in html output(bug#7160)
Generate <source> tests for evolution and evolution-prebuilt;
Do not generate client test template until a <sync> tests is existed.
2009-12-01 21:45:33 +01:00
Zhu, Yongsheng
7b79d80ebd Testing: show evolution-prebuilt in html output(bug#7160)
move 'evolution-prebuilt' summary from interoperability test
to client::source. Write xml and xsl codes to generate
html output to show its testing results.
2009-12-01 21:45:33 +01:00
Patrick Ohly
653c1986b9 runtest.py: fixed checking out branch from git
Checking out a branch which only exists remotely requires
a bit more work. Checking out tags might also have failed
due to an unnecessary "git pull". Now "git tag" and "git branch"
are used to check what the requested revision is and do the
necessary opertions.
2009-12-01 21:45:33 +01:00
Patrick Ohly
8e6bfc24e5 runtest.py: point prebuilt binaries to correct location of backends
The "prebuilt" test ran, but because it used the build directory
of the current platform it didn't find any backends, or the wrong
ones. Fixed by only using the backend setting from the previous
testing if the directory really exists and falling back to the
relative "backends" directory otherwise.

It might be possible to always use "backends". In order to not
change the running testing this wasn't done.
2009-12-01 21:45:33 +01:00
Zhu, Yongsheng
cf1c2aaaf6 Testing: add suppressions for valgrind in evo.supp
There are many new existing mem error in other libraries
so we add them in the evo.supp to ignore these errors.
2009-12-01 21:45:33 +01:00
Zhu, Yongsheng
280e67bddc Testing: refine return code checkings(bug#6457)
when memory leaks occur, the return code should be '100'
but python on unix will re-encode it and put them in a high byte
in a 16-bit number.
2009-12-01 21:45:33 +01:00
Zhu, Yongsheng
426cc66371 valgrindcheck.sh: don't force --leak-check and --trace-children
These two options must be part of VALGRIND_ARGS is non-default
values are desired. Previously --leak-check=yes and --trace-children=no
were always set by the script, which is too inflexible.
2009-12-01 21:45:33 +01:00
Zhu, Yongsheng
3855f132c7 ZYB: add README.zyb and customize test cases(MB#2424)
Add README.zyb file for ZYB interoperability test and
customize specified test cases for ZYB.

Now ZYB only supports contacts(vcard2.1). Now all test
cases of contacts are passed.
2009-12-01 21:45:42 +01:00
Zhu, Yongsheng
7f17cc02e6 client-test+ZYB: set maxMsgSize and maxObjSize as default value (MB#2424)
For ZYB, the client-test sets different maxMsgsize and
maxObjSize in two times sync and this causes server
initializing a slow-sync mode.
See detail:
http://bugzilla.moblin.org/show_bug.cgi?id=2424#c13
2009-12-01 21:45:42 +01:00
Zhu, Yongsheng
64a828623d ZYB: Ignore some properties comparison(MB#2424)
Some properties in vcard21 are dismissed by ZYB server.
So we ignore them in synccompare:
CALURI, CATEGORIES, FBURL, NICKNAME, X-MOZILLA-HTML,
PHOTO, X-EVOLUTION-FILE-AS, X-ANNIVERSARY,
X-ASSISTANT, X-EVOLUTION-BLOG-URL, X-EVOLUTION-VIDEO-URL,
X-GROUPWISE, X-ICQ, X-MANAGER, X-SPOUSE, X-YAHOO, X-AIM
2009-12-01 21:45:42 +01:00
Zhu, Yongsheng
c0e51e311a syncclient config: disable anchors checking for ZYB(MB#8138)
ZYB may send mismatched anchors though
there is no mistake between two syncs. If client
checks anchor, then a slow sync will be initiated.

So, synthesis adds an element 'lenientmode' in
'remoterule' to provide capability of disabling
or enabling anchors checking. Disable this kind
of checking for ZYB.
2009-12-01 21:45:42 +01:00
Zhu, Yongsheng
46a3ed30ee Mobical: skip unit test testOneWayFromClient(MB#8121)
Mobical has a known server issue that it initiates a
slow sync when one client syncs with it in one-way-from-client
mode from the second time.

Because Mobical has no schedule on this, we skip this
test for Mobical interoperability test.
2009-12-01 21:42:41 +01:00
Patrick Ohly
4de3b440ce shared config + templates: must share global properties
The command line did not read the global defaultPeer property unless
it found an existing context. This is an unnecessary optimization,
reading from an non-existant context yields no properties except
perhaps for defaultPeer, so we can do that and get the correct
result with and without a context.

Jussi mentioned that he didn't get defaultPeer when reading a
template. Added TestMultipleConfigs.testSharedTemplate to verify
that, but it passes without issues.
2009-12-01 21:40:01 +01:00
Patrick Ohly
f4e530e421 defaultPeer: also shared when using legacy configs (MB #8334)
This patch allows a user to read and write the single "defaultPeer"
property in ~/.config/syncevolution/config.ini even when selecting
a peer which has a legacy config in ~/.config/syncevolution/<name>.
This is more convenient and ensures that the sync-UI works correctly
even in those cases where the legacy config cannot (or has not) been
migrated.

It works by adding multiplexing of properties to the HTTP_SERVER case
and then using a separate global config node.

Really, really old configs in .sync4j/evolution do not share the
defaultPeer property, but I think this is acceptable.
2009-12-01 21:40:01 +01:00
Patrick Ohly
869ca8d2f4 fixed reading templates from file (MB #8335)
Broke while adding support for shared configs. We didn't have a test
for it, therefore this went unnoticed. I have added a test for it
(CmdlineTest::printFileTemplates) and fixed the issue (using the wrong
file layout for templates).

The test depends on having access to installed templates in a known
location, which previously was a problem due to the hard-coded
TEMPLATE_DIR. Now SyncContext::createServerTemplate() checks an env
variable (SYNCEVOLUTION_TEMPLATE_DIR) which is set by most of the
command line tests to prevent reading from there unintentionally and
once to "./templates" to ensure reading from there.
2009-12-01 21:40:01 +01:00
Patrick Ohly
28cf8bbcf5 virtual backend help text: updated evolutionsource comment
Adding
to the comment of "type" tripped up the Cmdline test,
which scans for lines which look like default property
values.

Rephrased the comment to avoid that, by removing the
"evolutionsource" keyword and the assignment.
2009-12-01 21:40:01 +01:00
Patrick Ohly
c7e97c3dfd config templates: "sync" property expected to be set
Since introducing shared configs, the default value of "sync" is
"none", so that peers which happen to share a source not configured
for them do not accidentally use it.

The code which prepared templates had not been adapted, breaking the
Cmdline test. Now an unset sync property is set to "two-way" for all
four default data sources, just like it was set before.

File templates can still set a specific source to some other default,
like "sync = none".
2009-12-01 21:40:01 +01:00
Patrick Ohly
671fb4e099 Merge remote branch 'origin/syncevolution-0-9-branch' 2009-12-01 21:39:46 +01:00
Patrick Ohly
30651e19b8 SyncSource.cpp: g++ 4.4 compiler bug workaround
is_any_of(" ") triggered an error in stl algo.
is_from_range(' ', ' ') worked and should also be
more efficient.

See http://stackoverflow.com/questions/1168525/c-gcc4-4-warning-array-subscript-is-above-array-bounds/
2009-12-01 18:53:45 +01:00
Patrick Ohly
a29a2540f5 autotools: fixed installation of backends with recent libtool
More recent libtool versions contain a check that the
install dir doesn't deviate too much from the libdir
compiled into the libs. This check failed when the
chosen path ended with a slash, leading to:

libtool: install: error: cannot install `syncecal.la' to a directory not ending in ...

I consider this a bug in libtool and sent a bug report
together with a fix. In the meantime, let's avoid the
problem by not adding any redundant slash in our
path...
2009-12-01 17:31:37 +01:00
Patrick Ohly
5ccbf8e2a2 syncevolution --migrate: support migration into a certain context
This depends on peer/context awareness in the code which looks for
the old config and renames it. If the old config is not in the same
context as the new one, it is searched by peer name alone. This
works for all old-style configs as well as rewriting a peer inside
the same context.
2009-12-01 17:27:59 +01:00