Several files created as part of the GUI build were not
properly removed during "make clean". Found with distcheck
when using DISTCHECK_CONFIGURE_FLAGS=--enable-gui
distcheck also complained about an untranslated .xml file
that it found after building the GUI. The .xml is
generated from .glade, which is translated, so the .xml
file can be ignored via POTFILES.skip.
The only way that I found not to execute a test was not to register
it in CPPUnit. FilterTest() does this by replacing a valid test
or test group with a dummy one, SkipTest, which just prints the
test name and that it is skipped.
Registering tests has to be intercepted at multiple levels:
- CPPUNIT_TEST in test suites
- ADD_TEST in ClientTest
- addTest in ClientTest
Not currently intercepted are complete test suites (CPPUNIT_TEST_SUITE).
The main purpose of this patch is to avoid running the time consuming
suspend and interrupt tests, but this feature might also be useful for
other tests, which is why it was implemented in a more general way.
Catch fatal signals (SIGSEGV, SIGABRT, SIGBUS) and in the signal
handler, flush and process output.
Flushing is done each time redirection is removed and thus
also catches output that is pending in either C or C++ output
streams during a normal application shutdown.
The abort-redirect test program covers such a scenario. It does
a double free, which depending on libc causes a segfault or
error message. The source is in "test" (like the rest of the
test programs) while the binary is built with "make abort-redirect"
in "src". It would be nicer if the test folder was a subdirectory of
src and wouldn't require its own Makefile, but that's a different issues...
Note that glib's double free report is written to the console
regardless whether stdout/stderr redirection is enabled. It seems
that glibc does not use FDs 1 or 2 for that, redirecting them in
the shell has no effect either. Catching the signal and flushing
is useful nevertheless.
First, fabricate a dummy unified diff header to keep "patch" happy.
It worked before, but printed a warning.
Second, make testcase2patch depend on generating the patched files
first. Avoids potential problems in parallel build.
This patch fully automates all work when running make inside the
src directory. It achieves that by not letting make check dependencies.
Instead shell commands check what needs to be updated. By using
touch with the patched file as reference, the regenerated patch
is never newer than it, thus cycles of repeatedly writing files
is avoided.
One drawback is that client-test is needlessly rebuilt, because
it now depends on a phony target. This is not optimal, but better
than not rebuilding files that have to be rebuild, as before.
We were using the same set of test cases for different server, this
is a bit limited; now importItem will first check a server specific
test case file and will fallback to the general case file if failed.
The makefile is also changed.
Makefile had Perl elsif instead of bash elif (didn't matter,
elif branch wasn't needed). syncevolution.xml
was replaced syncclient_sample_config.xml (fatal error).
src/gtk-ui had BUILT_SOURCE files which "make dist" tried
to generate even if the necessary tools where not available.
The generated files also must not be listed as
normal source of the binary, for the same reason.
The GTK+/Moblin UI now only uses gnome-keyring.
D-Bus service supports it but it is not required.
I think I will remove the authentication over dbus altogether,
it's just a bad idea. Then choices would be:
* authentication saved in config files, not changeable via dbus
* authentication via supported keyring methods
(currently gnome-keyring)
Building the backend shared objects failed with --enable-shared because
then the *Register.cpp files have to be compiled into them. This used to
fail due to a missing -I path for test.h. When compiling the files for
the main executables it worked (the case without --enable-shared) because
those executables had the right search path.
After fixing that, it was necessary to add the *Register.cpp files
to client-test (and only that) because only that way are the tests in them
really enabled.
To avoid the resulting link errors, client-test (and again, only that)
links to the backend shared objects directly. The main executables don't
do that because then they work even if a backend cannot be loaded dynamically
due to missing dependencies (as on older Maemo without libecal). For testing
these hard dependencies are acceptable.
syncevo-dbus -> src/dbus
interfaces -> src/dbus/interfaces
Files generated from D-Bus interfaces are only built once, in src/dbus/interfaces.
This is changes makes the code layout a bit nicer and, more importantly,
fixes build dependencies when Synthesis is compiled in src.
Now everything that is needed by a certain directory is in that directory
or a sub directory.
The server config.ini files and icon.[svg|png] in src/default will be installed
in /etc/default/syncevolution. All configurations found there extend and/or
override the builtin templates. The advantage is that file-based templates
can have icons and that templates can be added/modified without recompiling
SyncEvolution.
This meta information is now part of EvolutionSyncConfig:
- getWebURL() returns a URL with further information; this
replaces the hard-coded URL string that was previously
returned as comment for templates in the ServerList
- getIconURI() currently returns absolute file paths to
an icon file (example: icon.png for ScheduleWorld). The
content and exact URI may vary, depending on how system
administrators or distributions configure SyncEvolution.
If possible, callers should be able to handle http://
and other URI access methods.
Removed a spurious package check for synthesis which was reintroduced
during the recent code cleanup and merging.
Fixed compilation with --enable-unit-tests and/or --enable-integration-tests.
CPPUnit header files were not included properly.
When at least one of these enable options is used, client-test is built
as part of the normal "make all" and installed in bindir as part of
"make install". The test files go into the docdir.
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.
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.
SynthesisDBPlugin provides all C calls potentially used by
the Synthesis engine. It needs to be linked into the executable
or libsyncevolution.so so that the SyncEvolution_* calls
are visible to libsynthesis. They will get called when "SyncEvolution"
is specified as plugin name, using dlsym(RTLD_DEFAULT).
The "-uSyncEvolution_Module_Version -Wl,--export-dynamic" flags
are a bit platform specific; a configure check would be useful,
with compilation as a normal plugin as default.
syncevolution.xml is compiled into libsyncevolution. The <datastore>
entries are created for all active sync sources and replace
the <datastore/> place holder in the default configuration.
The configuration can be overridden by placing a syncevolution.xml
file in the current directory, with or without <datastore>
specifications. <datastore/> is replaced as usual.
<dbtypeid> values are generated as hash from the sync source name.
Collisions are not handled yet.
Copying SyncEvolution settings into the corresponding
Synthesis properties is implemented. A "syncevolution.xml"
with the client configuration must be in the current
directory. Currently it contains no configuration
for SyncEvolution data backends, only for SDK_textdb
addressbook.
As there is no synthesis.pc yet, use SYNTHESIS_CFLAGS=-Ifoo/include
and SYNTHESIS_LIBS=-Lfoo/lib -lsynthesissdk where foo is the
installation prefix of the Synthesis SDK.
configure checks out the right source automatically. Subversion
and git are supported. When given an existing directory with sources,
out-of-tree compilation is used instead of making a copy first.
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@744 15ad00c4-1369-45f4-8270-35d70d36bdcd
syncevolution and client-test were not rebuilt when lib changed.
Unit tests in lib were not pulled into client-test.
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@695 15ad00c4-1369-45f4-8270-35d70d36bdcd