This reverts commit 4a52bd669f.
Conflicts:
test/runtests.py
The patch had to be reverted because firewall rules now seem to leave
ssh access as the only means of accessing the repository. Conflict due
to later changes, resolved.
The default should have been the value of STABLE_RELEASE = yes in >= 1.1.99.5.
Instead the string SYNCEVOLUTION_STABLE_RELEASE was set. Fixed the typo.
The auto-sync tests modified the GNOME keyring by setting a password
for the same URL that is also used in the password request tests,
which caused those tests to fail.
Ideally this would be fixed by running each test with a fresh GNOME
keyring, but this is hard to set up. Instead solve the problem by
keeping the URLs separate.
On Ubuntu Lucid, GNOME keyring is not started when the GNOME keyring
library asks for the org.freedesktop.secrets service. This
broke testing of syncevo-dbus-server.
This commit solves the problem by explicitly starting and stopping
that daemon as part of creating the D-Bus session. This is similar
to what happens on Lucid when a GNOME session is started.
Explicitly specifysing --sync/source-properties is no longer necessary.
The information about local sync and CalDAV/CardDAV must provide enough
information for normal users to use the feature.
Most of the selected theme icons don't exist, so adding these values
only provides the possibility to add icons later on.
For Google Contacts, the existing gmail icon is used as a short-term
solution until the theme gets a proper google-contacts icon.
Due to too restrictive checking of the syncURL, configs without http
or obex-bt were never executed automatically. This commit adds a
fallback which enables "other" configs to run without checking for
peer presence.
In addition it marks all "local" syncs as needing HTTP
connectivity. This is a simplification that fits the current use
cases, but needs to be enhanced later on.
Auto-sync sessions did not properly activate their D-Bus support and
thus couldn't be accessed via the Session D-Bus API. Must have
affected showing progress of such sessions in the GTK sync-ui.
They also weren't kept around for one minute, like the sessions
started by a client. Therefore UIs which need to retrieve information
about a completed session failed for a second reason.
Fixed by adding the necessary "activate()" and use "addTimeout()"
trick for session expiry also in the AutoSyncManager. The later was
moved into DBusServer for that.
These issues were found with the new
TestSessionAPIsDummy.testAutoSyncFailure D-Bus test.
Memotoo incorrectly replaces HTML entities in plain text with
the corresponding characters. Reported to Memotoo admin via
email. In the meantime, make tests work again by simplifying
the test data.
When a config was set to "auto-sync on", the AutoSyncManager added it
to a list, but did not prevent the server from shutting down. Not sure
how this was meant to work or when it broke.
Fixing it is easy: as long as AutoSyncManager has at least one config
lined up for auto-syncing, it holds a reference on the AutoTerm
instance and thus prevents shutting down.
This commit also adds test cases for various situations:
- prevent shutdown while auto-sync on
- re-enable shutdown while timer is running
- re-enable shutdown while timer is off
TestingSyncSourcePtr used to catch all exceptions thrown while
constructing and opening the source. This had the negative effect that
errors logged contained the source code line inside
TestingSyncSourcePtr instead of the line where the test itself asks
for the source, which is much more important for debugging the
problem.
This commit thus removes the CPPUnit assertion which catches
exceptions and adds them in all locations inside test*() methods
which, directly or indirectly, create sources.
It is not essential to find all of these places. CPPUnit will report
uncaught exceptions in a test without including a source code
location, which is as good (or bad) as the information reported
previously.
In an incremental sync, the ActiveSync backend is only able to provide
data for updated or new items. This is sufficient, other items will
not be read during such a sync and item access doesn't use incremental
sync mode.
Therefore this commit relaxes the testChanges test by removing the
reading of an unmodified item.
g++ 4.6 and ld 2.21.52.20110707 (Debian Unstable) led to a different
order of global instance construction:
1. WebDAV constructor calls SyncConfig::getRegistry()
2. getRegistry() adds the (uninitialized!) property instances
and modifies them
3. SyncConfig.cpp instances are initializes, which resets
some of the values modified by getRegistry()
The result was that, for example, the "defaultPeer" property was
treated like an unshared property and written into the wrong config
file.
The assumption that variables in a compilation unit are initialized
before methods in that unit can be called is not based on anything in
the C++ standard. Therefore this commit rewrites the code so that
properties are not added/updated inside the getRegistry()
methods. Instead this is done in separate classes which (and that is
guaranteed by the C++ standard) are constructed after the properties
defined earlier in the compilation unit.
g++ 4.6 complains about the unused assignment. Probably this boolean
result needs to be checked. But as GDBus will be replaced soon anyway,
don't bother now.
As per RFC 2445, CATEGORIES:1,2 and CATEGORIES:1\nCATEGORIES:2 is
same. We need to pick one normal form. This commit ensures that all
categories are listed in a single CATEGORIES properties. This was both
easier to implement (splitting at a comma while not splitting at a \,
is tricky) and leads to a shorter normal form (less lines).
The reason for making this change now is that with Evolution 2.32.2
and libical 0.44-3, categories end up being stored with one entry per
CATEGORIES property. That by itself is okay and thus our tests should
pass, which they don't without this change to synccompare.
The only problem is that Evolution doesn't seem to handle it (breaks
setting categories in the UI even without syncing). That's something which
needs to be fixed in Evolution.
In contrast to the Yahoo template, this one doesn't mention
a specific service and enables both contact and calendar sync.
To be used with a service that supports auto-discovery.
A detached HEAD has a hash in .git/HEAD. This confused
gen-autotools.sh which tried to resolve it via "git show-ref", which
in turn only works for refs.
Now gen-autotools.sh checks for real hashes in .git/HEAD and truncates
them directly, without involving show-ref in this case.
The previous commit added a check for qmake, but then used QMAKE
without checking whether qmake was found at all. This caused configure
problems on systems where qmake wasn't available.
The error handling also wasn't correct. A "test" was missing in front
of the comparison.
The test was meant to check the error triggered by setting an
invalid backend value. Instead it checked the usability of such
a source and thus duplicated the (badly named) testCheckSourceNoType.
testCheckSourceInvalidType itself failed to pass when SyncEvolution
was compiled with modules, because then the "apple-contacts" backend
wasn't installed and SetConfig() failed with an unexpected error.
Now the test triggers that error in call cases with "backend = no-such-backend"
and checks that the right error is reported.
TestDBusSession.testSecondSession failed when TestDBusPresence tests
had been run before. The reason is apparently the mock Connman object
and its calls to loop.quit(): that causes the testSecondSession test
to stop before it has seen all the expected reasons for quitting the
main loop.
This commit changes TestDBusServerPresence so that the Connman object
is added and removed as part of setUp() and testDown(). This seems to fix
the problem.
Connman.GetProperties() now also returns something valid in the final
else clause. Previously Python recorded a lot of "'None' not iterable"
errors when Connman.GetProperties() was called more often than
expected and returned None.
Commit 1a40a29 (added after 1.1.99.4) removed timeouts in the local
transport, reasoning that such timeouts only make sense in unreliable
transports and only cause problems (like premature aborts).
Therefore the TestLocalSync.testTimeout which tested the old behavior
became invalid. Removed completely.
Commit 3f1185, contained in 1.1.99.3, changed
SyncContext::throwError() so that it throws a StatusException with
STATUS_FATAL. Previously a runtime exception was thrown, which
Exception::handle() recorded as a local error.
This commit fixes that regression by throwing a STATUS_FATAL +
LOCAL_STATUS_CODE, which restores the traditional result of
throwError().
Found by test-dbus.py TestDBusSyncError.testSyncNoConfig.
The test checked for zero status for inactive sources, whereas the
current implementation doesn't report anything for these sources at
all. Both is acceptable, but let's keep the test strict and check for
the current behavior.
TestConnection and TestSessionAPIsDummy used configs with
backend=addressbook/calendar/todo/memo which had to have databases
with a name derived from CLIENT_TEST_EVOLUTION_SOURCE and the source
name. This was neither documented nor did the required databases match
the ones used by the client-test programs anymore.
For the sake of making the test setup easier, this commit changes
these tests so that they use the file backend (always available) and
file://temp-test-dbus/<source name> databases (created if needed by
the backend). In other words, the tests now run without manual setup
of the host.
The downside is that D-Bus testing no longer covers the real
sources. That's okay, client-test covers that, whereas test-dbus.py
should focus on the D-Bus API itself.
'temp-test-dbus' is a bit more suitable than 'xdg-root' because
* it ties the directory to the script which creates it
* 'temp' implies that it holds no important data
* it is used for various files ('xdg_root' in the Python source
is a bit misleading)
The default value of 'test-dbus' is the same name as the directory
holding the source files used for testing. In the DBusUtil.runTest the
xdg_root directory is removed. So, when running test-dbus-py from the
test directory it deletes the directory in which the source file
reside.
runtests.py - made the SyncEvolutionTest class configurable so that it
can run test-bus.py, added "--enable=dbus" with it.
resultchecker.py - parse the output of test-dbus.py and split out the
failure reports for linking.
The purpose is two-fold:
- tell a user of test-dbus.py what he has to put on the command
line to run a failing test
- produce output that can be parsed more easily by resultchecker.py
Avoid Python warning when destructing the Python file runs into the
already closed fd by closing the file instead of the low-level fd.
Print some information about the current action.
Parsing the revision map extracted the wrong subset of the string. As
a result, the revision comparison was broken and reported more changes
than really existed. Showed up as a failure in
Client::Sync::eds_event::testOneWayFromClient and requests for items
in a multiget when it wasn't needed.
The script used to override the "database" property of
all configured sources in the "dbus_unittest" config.
That is confusing and wasn't documented.
Now the comment for TestSessionAPIsReal describes how to
set up a working config and then doesn't touch it.
The "retry on 401" code wasn't active during the initial sync
because the fact that the credentials had been accepted before
was only recorded on disk, but not in memory.
Moving the response handling from the data element to the response
element caused problems with Google, because it sends a 404 status for
the collection with no data. Apple Calendar Server didn't do that when
testing the change manually, so the problem only showed up in the
nightly testing.
This patch restores the previous behavior of simply ignoring responses
with no data. Some better error handling might be useful.