Commit graph

94 commits

Author SHA1 Message Date
Patrick Ohly
bc5b7aaff1 build fixes
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.
2009-07-14 08:47:37 +02:00
Patrick Ohly
c602de1c3e testing: skip certain tests by listing them in CLIENT_TEST_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.
2009-07-13 18:31:48 +02:00
Patrick Ohly
06de3dc6e5 logging: catch more redirected output when shutting down
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.
2009-07-10 08:43:37 +02:00
Patrick Ohly
00d46e1870 testing: minor improvements for patching test cases
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.
2009-07-09 12:12:16 +02:00
Patrick Ohly
e9e8ad72fb testing: better handling of test case cases (Bugzilla #2421)
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.
2009-07-09 10:44:58 +02:00
Chen Congwu
445bceb9a8 Test case files: better handling of test cases, bugzilla #2421
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.
2009-07-08 18:15:20 +02:00
tester
91969890ed build fix: D-Bus service .in file must be packaged in all cases
org.Moblin.SyncEvolution.service.in was only included in EXTRA_DIST
of D-Bus was enabled. It has to be packaged even if D-Bus support
is off.
2009-06-25 23:40:24 +02:00
Patrick Ohly
1f7ca84681 fixed some problems with "make dist"
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.
2009-06-25 19:27:51 +02:00
Jussi Kukkonen
cd6446e984 dbus service/client: add gnome-keyring support
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)
2009-05-29 10:38:14 +03:00
Patrick Ohly
f0115a4890 testing: fixed compile error and test driver linking with --enable-shared
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.
2009-05-12 17:23:21 +02:00
Patrick Ohly
94c62f34d5 build rules: moved D-Bus into sub directories
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.
2009-05-06 19:52:55 +02:00
Jussi Kukkonen
2c02041343 fix make dist 2009-05-06 10:49:34 +03:00
Jussi Kukkonen
b0b0c977a9 dbus service: use builddir when referring to dbus interface file 2009-04-16 20:06:21 +03:00
Jussi Kukkonen
0dccdb6362 dbus service: build syncevo-dbus-glue.h explicitly 2009-04-16 19:38:52 +03:00
Jussi Kukkonen
6f23974cfd dbus client: add and use new widget MuxBin
MuxBin is a GtkBin with a rounded corners, border and a title
with a bullet.

Also move ui related source to src/gtk-ui
2009-04-09 17:45:20 +03:00
Jussi Kukkonen
53b002c862 dbus client: refactor server configuration to a new file 2009-04-08 14:51:33 +03:00
Patrick Ohly
fa2e0c41c9 configuration: added support for configuration templates in /etc and server icons
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.
2009-04-07 20:33:18 +02:00
Patrick Ohly
3827dd52d6 out-of-tree compilation: need extra -I/-L arguments 2009-04-06 19:12:29 +02:00
Jussi Kukkonen
0d613e680d dbus client: add GUI
Syncing works. Modifying server configs does not work yet.
2009-04-05 13:25:35 +03:00
Jussi Kukkonen
bf5fe14858 fix dbus service build, fix init bug in DBusSyncClient 2009-04-02 20:36:59 +03:00
Jussi Kukkonen
c3fbb6f3bc add DBusSyncClient (a EvolutionSyncClient implementation) 2009-04-02 20:36:58 +03:00
Jussi Kukkonen
9a417300f0 Add initial dbus api and wrapper client library 2009-04-02 20:36:58 +03:00
Patrick Ohly
d1a2631e28 compilation: fixes + installation of client-test + version bump
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.
2009-03-25 14:43:49 +01:00
Patrick Ohly
e6cb3a9b6d packaging: run autogen.sh when copying Synthesis from git, needed later 2009-03-25 14:43:46 +01:00
Patrick Ohly
552bd34711 packaging: build ChangeLog from git log and copy Synthesis code via 'git archive' 2009-03-25 14:43:46 +01:00
Patrick Ohly
d71a296525 dist: fixed distcheck, bundle Synthesis
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.
2009-03-25 14:43:44 +01:00
Patrick Ohly
8e9512cd20 testing: fixed log handling during Client::Sync
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.
2009-03-25 14:43:37 +01:00
Patrick Ohly
41aaec7eb2 testing: compiles and runs again, but output redirection is not working yet 2009-03-25 14:43:36 +01:00
Patrick Ohly
43f2c5fec5 removed all references to Funambol header files and definitions 2009-03-25 14:43:35 +01:00
Patrick Ohly
5f0ecf5835 Synthesis: connect engine with EvolutionSyncSource
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.
2009-03-25 14:43:34 +01:00
Patrick Ohly
de8ee098e7 use Synthesis SDK to run a sync session
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.
2009-03-25 14:43:32 +01:00
Patrick Ohly
894c61951e improved handling of Funambol client library source
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
2008-09-14 17:52:08 +00:00
Patrick Ohly
319a873b57 removed obsolete LIBDBUS hack
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@729 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-17 08:50:42 +00:00
Patrick Ohly
f8ba6fcf71 previous commit disabled 'all' target - use BUILT_SOURCES instead
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@726 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 10:35:37 +00:00
Patrick Ohly
4903ca6918 fixed issue with inconsistent use of ClientTest.h after copying it to SyncEvolution
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@725 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-16 10:02:41 +00:00
Patrick Ohly
545757d700 added missing imemo20.ics test cases to build
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@713 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-05 20:11:11 +00:00
Patrick Ohly
d1b881b490 more dependency fixes
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@699 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-03 19:48:38 +00:00
Patrick Ohly
6b6fb65fda minor fixes for recent introduction of libsyncevolution
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
2008-08-03 12:58:30 +00:00
Patrick Ohly
218646af41 re-added 'test' target (alias for client-test now)
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@694 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-03 12:35:00 +00:00
Patrick Ohly
d08d1f7e88 added automatic registration of test
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@692 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-02 15:46:23 +00:00
Patrick Ohly
55e82b4101 client-test now depends on libsyncevolution.la and backends, i.e. 'all'
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@691 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-02 12:51:11 +00:00
Patrick Ohly
a248d0cc1d fixed inclusion of moved boost in distribution
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@690 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-08-02 07:55:51 +00:00
Patrick Ohly
f9e0745e72 unit tests in Register.cpp files not active without --enable-unit-tests
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@688 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-30 20:31:27 +00:00
Patrick Ohly
63e14ddc9c file layout restructuring, take II
Added missing files, finished automatic registration
of backends, Emacs mode for renamed files.


git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@685 15ad00c4-1369-45f4-8270-35d70d36bdcd
2008-07-30 17:30:10 +00:00
Renamed from src/Makefile.am.gen (Browse further)