Commit Graph

179 Commits

Author SHA1 Message Date
Dan Winship
ee17a54c28 GSimpleProxyResolver: new simple GProxyResolver class
Add GSimpleProxyResolver, for letting people do static proxy
resolution, and to use as a base class for other resolvers (such as
GProxyResolverGnome).

https://bugzilla.gnome.org/show_bug.cgi?id=691105
2013-02-14 10:24:14 -05:00
Matthias Clasen
ab328469f5 Silence automake
automake doesn't like INCLUDES anymore.
2013-02-02 22:54:15 -05:00
Руслан Ижбулатов
b1e02c7e32 Fix gio tests makefile for W32
While compiling, libtool will say that undefined symbols are not allowed, and
will refuse to make you a dll. This is only one line, easy to miss. And it
doesn't prevent `make' from completing successfully.

The code this patch adds is from other Makefile.am files that use
$(no_undefined). It's absence in gio is, most likely, an oversight.

Fixes #692058
2013-02-02 00:25:27 -05:00
Rico Tzschichholz
330c6c116e gio/tests: Drop superfluous dbus-1 dependencies of gdbus-auth 2013-01-04 21:36:37 +01:00
Rico Tzschichholz
125833d427 gio/tests: Fix make dist
Missing bit of 32c9254277
2013-01-04 20:37:27 +01:00
Matthias Clasen
361fe28fb9 Drop gdbus-testserver.py
The tests are using the C version of gdbus-testserver now.
This means we no longer rely on dbus-python for 'make check'.
https://bugzilla.gnome.org/show_bug.cgi?id=675856
2013-01-03 13:16:22 -05:00
Matthias Clasen
416fa3b9ef Add a C version of gdbus-testserver.py
This will let us drop the dbus-python dependency.
The C version does not 100% reproduce all the hash table
and array manipulation of the python version, but the tests
do not rely on it anyway.
2013-01-03 13:14:26 -05:00
David Zeuthen
2652dc1357 GDBus: Avoid use of libdbus-1 in authentication tests
This greatly simplifies the test since everything is now in a single
process and possible bugs / quirks in libdbus-1 will not interfere
with the tests. On the other hand, we no longer test interoperability
with libdbus-1. This is somewhat moot, however, since other tests that
involve a message bus (e.g. GTestDBus users which include most of the
GDBus test suite itself) will test this.

Also ensure that we don't pollute existing D-Bus keyrings for the
DBUS_COOKIE_SHA1 authentication method (e.g. files in the
~/.dbus-keyrings directory) by setting the environment variables
G_DBUS_COOKIE_SHA1_KEYRING_DIR and
G_DBUS_COOKIE_SHA1_KEYRING_DIR_IGNORE_PERMISSION.

All in all, this change avoids some thorny issues where the GDBus and
libdbus-1 implementations disagree on whether an item in the D-Bus
keyring is still valid (items have an age etc.). In reality, since the
DBUS_COOKIE_SHA1 authentication method is never used in production,
this is never hit in production. This bug was, however, frequently hit
if you just ran the test suite repeatedly for 15 minutes or so.

Also add TODO items to mention that we currently don't test corner
cases involving

 - DBUS_COOKIE_SHA1 timeouts
 - libdbus-1 interoperability

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2013-01-03 12:12:55 -05:00
Tristan Van Berkom
32c9254277 Adding test coverage for GTestDBus activating in-tree services.
https://bugzilla.gnome.org/show_bug.cgi?id=690543
2012-12-28 21:28:28 -05:00
Simon McVittie
32bfd46c7b GCredentials: add a regression test
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687920
2012-12-19 15:14:27 -05:00
Dan Winship
f248c86b0a win32: move some code into #ifdef G_OS_UNIX
Fix various bits of code/declarations that are only used by G_OS_UNIX
but were still visible to G_OS_WIN32.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:05 -05:00
Rico Tzschichholz
fa523734c7 gio/tests: Fix linker failure
Fixes 8c320d0c34
2012-10-27 12:10:44 +02:00
Stef Walter
d68b4e1d02 gio: No need to specify SOURCES when name matches executable
Removes some of the duplication from Makefile.am

https://bugzilla.gnome.org/show_bug.cgi?id=686921
2012-10-26 21:25:55 +02:00
Stef Walter
8c320d0c34 gio: Remove LDADD repetition from gio/tests Makefile
Using a global LDADD for the basic libraries to link.

https://bugzilla.gnome.org/show_bug.cgi?id=686921
2012-10-26 21:25:55 +02:00
Stef Walter
fb2d3aacb5 gdbus: Allow GDBusObjectManagerClient to work on peer connections
Allow GDBusObjectManagerClient to work on peer to peer DBus
connections. Don't require that a unique bus name is available
for the object manager, if the owned bus name is NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=686920
2012-10-26 21:20:04 +02:00
Dan Winship
4aeefa70a1 GTask: new GAsyncResult implementation / threaded task manager
GTask is a replacement for GSimpleAsyncResult and GIOScheduler, that
also allows for making cancellable wrappers around non-cancellable
functions (as in GThreadedResolver).

https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-10-10 10:29:36 -04:00
Dieter Verfaillie
db22102038 gresource tests: fix VPATH builds emitting errors during dependency generation
Adding the --sourcedir option fixes these:
/path/to/src/gio/tests/test2.gresource.xml: Error on line 5 char 1: Failed to locate 'test1.txt' in current directory.
/path/to/src/gio/tests/test3.gresource.xml: Error on line 5 char 1: Failed to locate 'test1.txt' in current directory.
/path/to/src/gio/tests/test4.gresource.xml: Error on line 5 char 1: Failed to locate 'test1.txt' in current directory.
/path/to/src/gio/tests/test.gresource.xml: Error on line 5 char 1: Failed to locate 'test1.txt' in current directory.
2012-09-17 15:29:59 +02:00
Dan Winship
568f737708 gio/tests: port some stuff to g_test_expect_message()
https://bugzilla.gnome.org/show_bug.cgi?id=682560
2012-09-03 08:40:14 -04:00
Matthias Clasen
35bf77445b Add some GInetAddress tests 2012-08-19 02:22:59 -04:00
Matthias Clasen
867ad1cebc Add some GPermission tests 2012-08-19 02:22:33 -04:00
Christian Persch
4979c1d075 application: Add dbus register/unregister hooks
When the application is using its D-Bus backend, it is useful to be able
to export extra D-Bus objects at the right time, i.e. *before* the application
tries to own the bus name. This is accomplished here by adding a hook
in GApplicationClass for this; and a corresponding hook that will be called
on unregistration to undo whatever the register hook did.

Bug #675509.
2012-05-29 19:01:42 +02:00
Dieter Verfaillie
b053f990c9 win32: More srcdir != builddir fixing 2012-04-24 16:39:21 +02:00
Dan Winship
2a37bc0dc6 gio: add a proxy test program
Test GProxy, GProxyResolver, GProxyAddress, and
GProxyAddressEnumerator, plus GSocketClient's proxy-resolving
codepaths.
2012-04-22 15:24:36 -04:00
Alexander Larsson
0d8b1b14d2 Add gdbus-daemon test app 2012-04-20 15:02:48 +02:00
Alexander Larsson
21e049b253 Tests: Move dbus specific tests to if HAVE_DBUS_DAEMON
These used to only be built on unix, but if you have dbus-daemon on
win32 we should really build them there too.
2012-04-19 18:19:10 +02:00
Kalev Lember
b3b32be1e1 Only build gmenumodel test on unix
It depends on gdbus-sessionbus.c which only builds on unix.
2012-04-16 18:46:12 +03:00
David Zeuthen
b9d1fe7db2 Check that auth methods work and interoperate with libdbus-1
See https://bugzilla.gnome.org/show_bug.cgi?id=673943

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-14 12:33:14 -04:00
Matthias Clasen
6a57bf1243 Make the dbus menu tests independent from the session bus
With this change,
DBUS_SESSION_BUS_ADDRESS= make check
succeed here.
2012-04-08 10:24:50 -04:00
Matthias Clasen
f1d4d3a4a5 Improve GApplication tests
Make GApplication tests manage their dbus connections.
2012-04-04 15:02:48 -04:00
Alexander Larsson
aed6d01d14 Only build actions test on unix
It depends on gdbus-sessionbus.c which only builds on unix.
2012-03-20 10:18:32 +01:00
Cosimo Cecchi
7cf50ceb85 tests: fix GAction test for headless run 2012-03-06 22:11:22 -05:00
Michael Biebl
cc2104e87a build: Fix failure on "make distclean"
https://bugzilla.gnome.org/show_bug.cgi?id=671270
2012-03-03 21:39:35 +01:00
Kalev Lember
a60f475b36 gio/tests: Fix out-of-source build
The glib-compile-resources --generate-dependencies call was failing,
although not stopping the build.

Failed to open file 'test2.gresource.xml': No such file or directory
Failed to open file 'test3.gresource.xml': No such file or directory
Failed to open file 'test4.gresource.xml': No such file or directory
Failed to open file 'test.gresource.xml': No such file or directory
2012-02-01 15:53:55 +02:00
Matthias Clasen
e6713ec810 Fix distclean 2012-01-30 18:46:11 -05:00
Christian Persch
f42a5fb53b resources: compiler: Add autoselected output format
This allows simplifying the make rules.

Bug #668539.
2012-01-25 14:47:48 +01:00
Christian Persch
55d10d6bfd resources: compiler: Add dependency generator
Bug #668532.
2012-01-25 14:47:37 +01:00
Dan Winship
da9d98728d Fix glib-compile-resources usage when cross-compiling
Copy the behavior of glib-genmarshal: require an installed copy of it,
and use that rather than the built copy.
2012-01-18 12:07:11 -05:00
Rico Tzschichholz
0fd61489e5 gio/tests: Fix out-of-source build and use uninstalled libraries 2012-01-14 11:18:07 +01:00
Rico Tzschichholz
86cd3018e0 gio/tests: add some missing files to EXTRA_DIST 2012-01-13 23:48:12 +01:00
Rico Tzschichholz
8735f53ae4 tests: Fix build failure of resources by linking against libgmodule-2.0.la 2012-01-13 22:35:44 +01:00
Alexander Larsson
75439298f8 Add tests for GResource 2012-01-13 17:12:53 +01:00
Ryan Lortie
0c094d6607 Drop the GApplication menu test 2011-12-19 12:34:16 -05:00
Matthias Clasen
41c19c7df8 GApplication: Add a menu example to the docs 2011-12-08 18:05:13 -05:00
Ryan Lortie
6dfb9d583f Add GMenuModel testcases 2011-12-08 18:05:12 -05:00
Tristan Van Berkom
a00530ecb0 GDBusInterfaceSkeleton: make it possible to export on multiple connections
This is useful in peer-to-peer connections.

With minor changes by David Zeuthen <davidz@redhat.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=662718

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-12-02 11:20:21 -05:00
Ryan Lortie
59623973fa dist gio/tests/key8.pem 2011-11-21 14:23:17 -05:00
Simon McVittie
4bb411948c Add test case for #662395
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 18:16:51 +00:00
Simon McVittie
96deb40caa GDBus tests: factor out TestIOStream, test_pipe and test_bidi_pipe
These might even make useful public API if they grew a Windows
implementation, but for now they can be Unix-only test API.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-11-21 18:15:26 +00:00
Matthias Clasen
011a71cf71 'make dist' fixes 2011-11-17 14:03:39 +00:00
Benjamin Otte
60c42f6648 tests: Add tests for fileattributematchers 2011-11-16 17:18:58 +01:00