syncevolution/test/test.am

171 lines
8.9 KiB
Text
Raw Normal View History

dist_noinst_DATA += \
test/abort-redirect.cpp \
test/ClientTest.h \
test/ClientTestAssert.h \
test/ClientTest.cpp \
test/client-test-main.cpp \
test/test.h \
test/test.cpp
dist_noinst_SCRIPTS += \
test/Algorithm/Diff.pm \
test/syncevo-http-server.py \
test/syncevo-phone-config.py \
test/synccompare.pl \
test/log2html.py \
test/run_src_client_test.sh
test_testcases = \
test/testcases/eds_event.ics \
test/testcases/eds_event.ics.local \
test/testcases/eds_task.ics \
test/testcases/vcal10.ics \
CardDAV: use Apple/Google/CardDAV vCard flavor In principle, CardDAV servers support arbitrary vCard 3.0 data. Extensions can be different and need to be preserved. However, when multiple different clients or the server's Web UI interpret the vCards, they need to agree on the semantic of these vCard extensions. In practice, CardDAV was pushed by Apple and Apple clients are probably the most common clients of CardDAV services. When the Google Contacts Web UI creates or edits a contact, Google CardDAV will send that data using the vCard flavor used by Apple. Therefore it makes sense to exchange contacts with *all* CardDAV servers using that format. This format could be made configurable in SyncEvolution on a case-by-case basis; at the moment, it is hard-coded. During syncing, SyncEvolution takes care to translate between the vCard flavor used internally (based on Evolution) and the CardDAV vCard flavor. This mapping includes: X-AIM/JABBER/... <-> IMPP + X-SERVICE-TYPE Any IMPP property declared as X-SERVICE-TYPE=AIM will get mapped to X-AIM. Same for others. Some IMPP service types have no known X- property extension; they are stored in EDS as IMPP. X- property extensions without a known X-SERVICE-TYPE (for example, GaduGadu and Groupwise) are stored with X-SERVICE-TYPE values chosen by SyncEvolution so that Google CardDAV preserves them (GroupWise with mixed case got translated by Google into Groupwise, so the latter is used). Google always sends an X-ABLabel:Other for IMPP. This is ignored because the service type overrides it. The value itself also gets transformed during the mapping. IMPP uses an URI as value, with a chat protocol (like "aim" or "xmpp") and some protocol specific identifier. For each X- extension the protocol is determined by the property name and the value is the protocol specific identifier without URL encoding. X-SPOUSE/MANAGER/ASSISTANT <-> X-ABRELATEDNAMES + X-ABLabel The mapping is based on the X-ABLabel property attached to the X-ABRELATEDNAMES property. This depends on the English words "Spouse", "Manager", "Assistant" that Google CardDAV and Apple devices seem to use regardless of the configured language. As with IMPP, only the subset of related names which have a corresponding X- property extension get mapped. The rest is stored in EDS using the X-ABRELATEDNAMES property. X-ANNIVERSARY <-> X-ABDATE Same here, with X-ABLabel:Anniversary as the special case which gets mapped. X-ABLabel parameter <-> property CardDAV vCards have labels attached to arbitrary other properties (TEL, ADR, X-ABDATE, X-ABRELATEDNAMES, ...) via vCard group tags: item1.X-ABDATE:2010-01-01 item1.X-ABLabel:Anniversary The advantage is that property values can contain arbitrary characters, including line breaks and double quotation marks, which is not possible in property parameters. Neither EDS nor KDE (judging from the lack of responses on the KDE-PIM mailing list) support custom labels. SyncEvolution could have used grouping as it is done in CardDAV, but grouping is not used much (not at all?) by the UIs working with the vCards in EDS and KDE. It seemed easier to use a new X-ABLabel parameter. Characters which cannot be stored in a parameter get converted (double space to single space, line break to space, etc.) during syncing. In practice, these characters don't appear in X-ABLabel properties anyway because neither Apple nor Google UIs allow entering them for custom labels. The "Other" label is used by Google even in case where it adds no information. For example, all XMPP properties have an associated X-ABLabel=Other although the Web UI does not provide a means to edit or show such a label. Editing the text before the value in the UI changes the X-SERVICE-TYPE parameter value, not the X-ABLabel as for other fields. Therefore the "Other" label is ignored by removing it during syncing. X-EVOLUTION-UI-SLOT (the parameter used in Evolution to determine the order of properties in the UI) gets stored in CardDAV. The only exception is Google CardDAV which got confused when an IMPP property had both X-SERVICE-TYPE and X-EVOLUTION-UI-SLOT parameters set. For Google, X-EVOLUTION-UI-SLOT is only sent on other properties and thus ordering of chat information can get lost when syncing with Google. CardDAV needs to use test data with the new CardDAV vCard flavor. Most CardDAV servers can store EDS vCards and thus Client::Source::*::testImport passed (with minor tweaks in synccompare) when using the default eds_contact.vcf, but Client::Sync::*::testItems fails when comparing synced data with test cases when the synced data uses the native format and the test cases are still the ones from EDS. A libsynthesis with URLENCODE/DECODE() and sharedfield parameter for <property> is needed.
2014-05-16 11:25:00 +02:00
test/testcases/carddav.vcf \
test/testcases/eds_contact.vcf \
test/testcases/eds_memo.ics \
test/testcases/google_event.ics \
test/testcases/yahoo_contact.vcf \
test/testcases/lcs/file1.txt \
test/testcases/lcs/file2.txt \
test/testcases/local.png \
test/testcases/templates/clients/phone/nokia/S40/7210c.ini \
test/testcases/templates/clients/SyncEvolution.ini \
test/testcases/synctests/apple/eds_contact/testUpload/local-synced \
test/testcases/synctests/apple/eds_contact/testUpload/local \
test/testcases/synctests/apple/eds_contact/testUpload/modify-remote \
test/testcases/synctests/apple/eds_contact/testUpload/remote \
test/testcases/synctests/apple/eds_contact/testDownload/modify-local \
test/testcases/synctests/apple/eds_contact/testDownload/local \
test/testcases/synctests/apple/eds_contact/testDownload/remote \
test/testcases/synctests/apple/eds_contact/testDownload/remote-synced \
test/testcases/synctests/googlecontacts/eds_contact/testUpload/local-synced \
test/testcases/synctests/googlecontacts/eds_contact/testUpload/local \
test/testcases/synctests/googlecontacts/eds_contact/testUpload/modify-remote \
test/testcases/synctests/googlecontacts/eds_contact/testUpload/remote \
test/testcases/synctests/googlecontacts/eds_contact/testDownload/modify-local \
test/testcases/synctests/googlecontacts/eds_contact/testDownload/local \
test/testcases/synctests/googlecontacts/eds_contact/testDownload/remote \
test/testcases/synctests/googlecontacts/eds_contact/testDownload/remote-synced \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateRemoteWins/modify-local \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateRemoteWins/local-synced \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateRemoteWins/local \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateRemoteWins/modify-remote \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateRemoteWins/remote-synced \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateLocalWins/modify-local \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateLocalWins/local-synced \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateLocalWins/local \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateLocalWins/modify-remote \
test/testcases/synctests/googlecontacts/eds_contact/testUpdateLocalWins/remote-synced \
$(NOP)
dist_noinst_DATA += \
$(test_testcases) \
test/COPYING \
test/Algorithm/Artistic \
test/Algorithm/COPYING \
test/Algorithm/README \
test/syncevo-http-server-logging.conf \
$(wildcard test/testcases/*.patch)
# generic D-Bus client/server tests
if COND_DBUS
noinst_PROGRAMS += test/dbus-client-server
test_dbus_client_server_SOURCES = test/dbus-client-server.cpp
test_dbus_client_server_CPPFLAGS = -I$(gdbus_dir) -I$(top_srcdir)/src
test_dbus_client_server_CXXFLAGS = $(CPPUNIT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(BACKEND_CPPFLAGS) $(DBUS_CFLAGS) $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(PCRECPP_CFLAGS)
test_dbus_client_server_LDFLAGS = $(CPPUNIT_LIBS)
test_dbus_client_server_LDADD = $(gdbus_build_dir)/libgdbussyncevo.la src/syncevo/libsyncevolution.la $(DBUS_LIBS) $(GLIB_LIBS) $(GOBJECT_LIBS) $(PCRECPP_LIBS) $(EXTRACORELDADD)
test_dbus_client_server_DEPENDENCIES = $(gdbus_build_dir)/libgdbussyncevo.la src/syncevo/libsyncevolution.la
if ENABLE_UNIT_TESTS
test_dbus_client_server_SOURCES += test/test.cpp
endif
endif
if ENABLE_TESTING
test_SCRIPTS += \
test/__init__.py \
test/test-dbus.py \
test/testdbus.py \
$(NOP)
# Install symbolic links, to ensure that testing in the testdir
# uses the right SyncEvolution without depending on the PATH.
# client-test should have been installed in testdir already as
# normal executable, see src.am.
all_install_exec_hooks += install-test-files
install-test-files:
mkdir -p $(DESTDIR)/$(testdir)
ln -f -s $(bindir)/syncevolution $(DESTDIR)/$(testdir)
ln -f -s $(bindir)/synccompare $(DESTDIR)/$(testdir)
ln -f -s $(libexecdir)/syncevo-dbus-server $(DESTDIR)/$(testdir)
ln -f -s $(bindir)/synclog2html $(DESTDIR)/$(testdir)
ln -f -s $(bindir)/syncevo-webdav-lookup $(DESTDIR)/$(testdir)
cp config.h $(top_srcdir)/src/syncevo/SyncConfig.h src/ClientTest.cpp.html $(DESTDIR)/$(testdir) # needed by test-dbus.py
all_uninstall_hooks += uninstall-test-files
uninstall-test-files:
rm -f $(DESTDIR)/$(testdir)/syncevolution \
$(DESTDIR)/$(testdir)/synccompare \
$(DESTDIR)/$(testdir)/syncevo-dbus-server \
$(DESTDIR)/$(testdir)/synclog2html \
$(DESTDIR)/$(testdir)/syncevo-webdav-lookup \
$(DESTDIR)/$(testdir)/SyncConfig.h \
$(DESTDIR)/$(testdir)/ClientTests.cpp.html \
$(DESTDIR)/$(testdir)/config.h \
$(NOP)
test_DATA += \
test/Makefile \
$(NOP)
nobase_testparent_DATA += \
$(test_testcases) \
test/test-dbus/templates/templates/clients/phone/nokia/S40/7210c.ini \
test/test-dbus/templates/templates/clients/SyncEvolution.ini \
test/test-dbus/auto-sync/config/syncevolution/.internal.ini \
test/test-dbus/auto-sync/config/syncevolution/default/.internal.ini \
test/test-dbus/auto-sync/config/syncevolution/default/config.ini \
test/test-dbus/auto-sync/config/syncevolution/default/peers/scheduleworld/.internal.ini \
test/test-dbus/auto-sync/config/syncevolution/default/peers/scheduleworld/config.ini \
test/test-dbus/auto-sync/config/syncevolution/config.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/todo.after.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/todo.current/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/addressbook.before.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.before.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/todo.current.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.current.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.after/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.after/2 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/status.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.before/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/todo.after/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/addressbook.current/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.after.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.after/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.after/3 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.after/2 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.after.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.before.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/addressbook.current.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/addressbook.after/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.current/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/memo.current/2 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/addressbook.after.ini \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.before/1 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.before/3 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/calendar.before/2 \
test/test-dbus/restore/cache/syncevolution/dummy_+test-2009-12-21-13-19/todo.before.ini \
test/test-dbus/reports/cache/syncevolution/dummy_+test-2009-11-18-12-57/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy-2009-11-18-13-00/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy_+test-2009-11-18-12-55/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy_+test-2009-11-18-13-01/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy_+test-2009-11-18-12-59/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy_+test-2009-11-18-12-58/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy_+test@context-2010-01-20-10-10/status.ini \
test/test-dbus/reports/cache/syncevolution/dummy__test-2009-11-18-12-56/status.ini \
$(NOP)
endif # ENABLE_TESTING