Commit graph

33 commits

Author SHA1 Message Date
Simon McVittie
f56a55af1a Revert "made session service dirs customizable: cmake part"
This reverts commit 89e453216c.
It makes the tests fail under autotools.
2012-01-04 18:20:15 +00:00
Ralf Habacker
89e453216c made session service dirs customizable: cmake part 2011-11-21 12:21:01 +01:00
Simon McVittie
c141af6147 Remove EXT variable from CMake, just use Automake-compatible EXEEXT
According to Ralf, there's no standard name for this in CMake, so we
might as well use the standard Automake name.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:01:15 +01:00
Simon McVittie
e9f0378bbf Merge tests' cmake and autotools bus configuration
In Unix, the tests listened on both debug-pipe (which is a socketpair,
or a TCP emulation of socketpair on Windows) and a Unix socket.

In the Windows port, the tests were hard-coded to listen on a particular
port, which allowed the dispatch test to connect to that port, as long
as no two tests ran simultaneously (which I don't think was ever guaranteed -
make -j can violate this). That's valid out-of-process, and also
fully-specified, so they only needed one <listen> directive, so the
CMake input only had one.

To make the tests work under CMake on Unix, there was a hack: the string
substituted for the content of the <listen> directive contained
</listen><listen> to get the other address in, which is pretty nasty.

Instead of doing that, I've made both build systems, on both Unix and
Windows, use both debug-pipe and a more normal transport (Unix or TCP).
debug-pipe has a Windows implementation and it's used in
dbus-spawn-win.c, so it'd better work. The use of debug-pipe is now
hard-coded rather than being a configure parameter (there's no reason
to vary it in different builds), and I used TEST_LISTEN as the name of the
Unix/TCP address, because it's a "vague" address (no specific Unix path, no
TCP port), that you can listen on but not connect to.

This in turn means that we can merge the Autoconf .in and CMake .cmake
files, similar to Bug #41033.

You might wonder why I've kept debug-pipe. I did try to get rid of it, but
it turns out that the tests in dispatch.c rely on
dbus_connection_open_private() not blocking, and normal socket
connections block on connect(). Until we fix that by adding an async
version of dbus_connection_open_private(), it won't be safe to have a
test like dispatch.c that "talks to itself", unless it uses a transport
as trivial as debug-pipe in which neither end has to block on the other.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41222
2011-09-28 19:00:56 +01:00
Simon McVittie
274e0fbc20 Simplify linking for tests that use libdbus-testutils
This is the library used by tests that link libdbus-internal and DBusLoop.
By linking libdbus-internal into it, we can avoid having to repeat that
dependency all over the place - libtool and cmake both know how to follow
recursive dependencies.

In cmake, also use libdbus-testutils for more tests, in preference to
repeating its source files.
2011-07-29 11:17:17 +01:00
Simon McVittie
9a97f82079 Import compiler.m4 and lcov.am from telepathy-glib, and use them to replace gcov
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
2011-02-17 17:07:12 +00:00
Ralf Habacker
37619035de Keep in sync with automake. 2010-12-04 23:05:56 +01:00
Ralf Habacker
280cdc2ad8 Added missing test libraries and tools to keep in sync with autotools. 2010-04-13 21:18:41 +02:00
Ralf Habacker
e828d41e3e Keep test file directories in sync with autotools 2010-04-13 21:17:31 +02:00
Ralf Habacker
4d8dcd5561 Cmake build system cleanup.
Converted tabs to spaces and removed trailing spaces in test dir.
2010-04-11 11:53:56 +02:00
Ralf Habacker
0ed7d779b7 Cmake support for cross plattform usable test files.
Recent test configuration files contains 'unix:...'
bus adresses which do not work on windows.
For cross plattform usable test files the whole
listen tag entry has to be set by the build system,
which is available with a new build system variable
named TEST_LISTEN.
To have the client client side definition in sync,
TEST_CONNECTION has been moved from c file into cmake
build system.
2010-04-11 11:49:46 +02:00
Ralf Habacker
19251c52de Simplified cmake specific test file generating.
If there is a *.cmake test file available for
a related *.in file, take the *.cmake test file
instead of the *.in file as test file source.
Also added some messages.
2010-04-09 23:07:11 +02:00
Ralf Habacker
1d0076b500 Keep cmake build system in sync with commit d47154c28b. 2010-03-22 22:33:02 +01:00
unknown
2154acb349 Make the windows binaries and build match the linux one with cmake buildsystem.
This is performed by including the files from the client lib in the internal one
and by removing the linking to dbus-1 for targets using the internal library.
2010-03-22 10:41:06 +01:00
Ralf Habacker
d999abdaa8 CMake dbus libraries usage cleanup.
Renamed DBUS_LIBRARIES to DBUS_INTERNAL_LIBRARIES and moved to top level CMakeLists.txt.
Removed obsolate references of dbus-internal library.
Added DBUS_LIBRARIES definition which contains only the dbus library.
2010-03-20 22:33:58 +01:00
Ralf Habacker
76919f681c fixed bus-test sha1 connection address on unix with cmake build system 2010-03-08 15:56:56 +01:00
Romain Pokrzywka
b0e0cd03e8 commented bits cleanup 2010-02-07 00:32:44 +01:00
Romain Pokrzywka
bbd1c9fe82 now fix the build for the tests; turns out we need another set of exports, since some tests are compiled in the client lib and some are in the internal lib... 2010-02-07 00:32:39 +01:00
Ralf Habacker
4a24e84aa7 readded test files required for windows 2009-12-01 10:53:53 +01:00
Frank Osterfeld
08f8057d1f do not run test binaries as unit tests if they aren't unit tests (cherry picked from commit 5281f5b113bd97152d1c9eac050432bda3274748) 2009-11-30 13:43:18 +01:00
Frank Osterfeld
fa2a53309d fix warning, use Sleep, not _sleep on windows (cherry picked from commit ea36c743ad60a2dd5c6286571d1a475903519809) 2009-11-30 12:00:14 +01:00
Frank Osterfeld
9f36b6760c fix TEST_SOCKET_DIR on windows, do not override value from top-level in test/ (cherry picked from commit fde144333281348cda2d533331946996d7a09bff) 2009-11-30 11:39:23 +01:00
Frank Osterfeld
c89d506700 bus-test-launch-helper is a unit test, test-service and test-shell-service are not. Rename test-shell to shell-test to match autotools (cherry picked from commit b106387b73d6a300a013a15f6507244e82f007ed) 2009-11-30 11:39:21 +01:00
Frank Osterfeld
a4e65790ea Use correct sources to build test-shell-service, fixes a hang in bus-test (cherry picked from commit 0afe04db5152b57582863bef83a55d78020a79c6) 2009-11-30 11:39:21 +01:00
Ralf Habacker
ed1c2fdd82 removed obsolate files 2009-11-30 11:28:37 +01:00
Frank Osterfeld
dbde622530 cleanup: these files are already generated elsewhere (cherry picked from commit 21f66df24affd4a4d2fb3324fb51899c811530da) 2009-11-30 11:26:13 +01:00
Frank Osterfeld
3baa9550f0 rename test-spawn to spawn-test, to match autotools. test-sleep-forever is not a stand-alone test but called from other tests (cherry picked from commit 41bf95167cfc17b564594eab0a1901e46eaab5fe) 2009-11-30 11:09:27 +01:00
Frank Osterfeld
b0efb6d156 fix test and binary names (cherry picked from commit 18bcf5f2d474456c57cd94da234005a23e2589a7) 2009-11-30 11:09:26 +01:00
Frank Osterfeld
aae3becbf3 rename second test-names to test-names2 to avoid confusion (cherry picked from commit c83a2d79bb215b19b02987c9a45ed1bf07e5eeaf) 2009-11-30 11:09:26 +01:00
Frank Osterfeld
a7330a9673 generate all config files from the .in files. Set some of the required variables replaced in the .in files by configure_file (cherry picked from commit 4980ffa1093877af182e032a13f6162df57be09f) 2009-11-30 11:09:23 +01:00
Christian Ehrlicher
4668480458 merge changes done to the cmake-buildsystem from the sf.net windbus-svn trunk. tested and works fine with at least msvc2008. (cherry picked from commit 45c168fd61e3f6447e014df4bb6417efbe725ccd) 2009-11-30 10:32:04 +01:00
Ralf Habacker
17b84104f2 * cmake/: don't install test applications and service files, moved CMAKE_DEBUG_POSTFIX to top level CMakeLists.txt 2007-04-28 19:37:25 +00:00
Ralf Habacker
36ebfd411b * cmake: new directory, contains cmake build support.
See http://www.cmake.org for more informations.
Currently only unix will be buildable because some
win32 required files are still missing.
2007-03-03 14:32:17 +00:00