Commit Graph

14528 Commits

Author SHA1 Message Date
Ryan Lortie
94a89f6c2f gapplication(1): print GVariant errors in context
Use g_variant_parse_error_print_context() to format the error message
from the GVariant parser.

https://bugzilla.gnome.org/show_bug.cgi?id=715028
2013-12-22 11:41:44 -05:00
Ryan Lortie
420f90d849 gsettings tool: print GVariant errors in context
Use g_variant_parse_error_print_context() to format the error message
from the GVariant parser.

https://bugzilla.gnome.org/show_bug.cgi?id=715028
2013-12-22 11:41:43 -05:00
Ryan Lortie
56fb675d86 GVariant: add way to print context of parse errors
This was a feature intended from the very beginning that somehow never
got written.  It's a way to replace these sort of error messages out of
the GVariant parser:

  1-2,10-15:unable to find a common type

with something in the style of the Vala compiler:

  unable to find a common type:
    [1, 2, 3, 'str']
     ^        ^^^^^

https://bugzilla.gnome.org/show_bug.cgi?id=715028
2013-12-22 11:41:19 -05:00
Ryan Lortie
3f41e49285 Use POSIX-specified <poll.h> over <sys/poll.h>
POSIX specifies that <poll.h> is the correct header to include for
poll(), so let's do that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=141251
2013-12-22 11:33:07 -05:00
Murray Cumming
eeac91f866 GVariant: Add g_variant_parse_error_quark()
Most GErrors, such as GSomethingError, have a function to get
their quark that looks like g_something_error_quark(),
so bindings (such as gtkmm) would expect GVariantParseError
to have g_variant_parse_error_quark(). Instead this had
g_variant_parser_get_error_quark().
This deprecates the old function and adds the correct one,
making life easier for gtkmm (and maybe others).

https://bugzilla.gnome.org/show_bug.cgi?id=708212
2013-12-22 11:27:16 -05:00
Matthias Clasen
864d960d75 More settings backend tests
This adds some more test coverage around writability changes
in the keyfile and delayed settings backends.
2013-12-22 00:44:56 -05:00
Matthias Clasen
41a8296e11 GKeyfileSettingsBackend: Use a directory monitor
GKeyfileSettingsBackend was using a file monitor to monitor
the parent directory of its keyfile.
2013-12-22 00:43:44 -05:00
Matthias Clasen
3c873e7617 More test coverage for settings backends 2013-12-21 16:49:52 -05:00
Matthias Clasen
8669f2c915 Simplify coverage rules
This works just fine, no need for the manual removal of the
info file.
2013-12-21 16:16:28 -05:00
Matthias Clasen
a5d8209d75 Fix a typo 2013-12-21 15:44:51 -05:00
Matthias Clasen
d6e95cc5f5 Fix a !srcdir problem with installed tests
When installing scripts which are not generated in a
srcdir != builddir build, $< will have ../.. goo in it.
So we need to strip the directory parts before using
the filename to construct a new path.
2013-12-21 13:22:00 -05:00
Matthias Clasen
dac1ad66eb Improve gsettings test coverage
Deal with corner cases around delay.
2013-12-21 13:22:00 -05:00
Matthias Clasen
fc828c4de8 contenttype tests: better assertions
I recently had to track down why these tests failed. Turned
out that some rogue package on my system had installed mime
types that declared all files with 3 letter names to be
'chemical/x-turbomole-vibrational'.
This change will make it more obvious what is going on by
mentioning the mime types in the assertion message.
2013-12-21 13:22:00 -05:00
Matthias Clasen
6d8ac1125e Slightly improve coverate for notification tests 2013-12-21 13:22:00 -05:00
Matthias Clasen
5ab9e21d7a Improve test coverage for GPropertyAction 2013-12-21 13:22:00 -05:00
Matthias Clasen
f9747d07c8 Test some gsettings corner case
Setting a strv to NULL was not tested before.
2013-12-21 13:22:00 -05:00
Matthias Clasen
2f01b0975e Some tweaks to coverage support
Rename the configure option to --enable-coverage, and make
it quiet by default.
2013-12-21 13:22:00 -05:00
Fran Diéguez
65a7e56328 Updated Galician translations 2013-12-19 01:17:25 +01:00
Dan Winship
fab0805b81 Make g_test_run() return 77 if all tests are skipped
Change g_test_run() to return 1 on failure (rather than the number of
failed tests), and 77 if all tests are skipped (since automake and
some other test harnesses recognize that status code).

Previously g_test_run() returned the number of failed tests, but this
behavior was not documented, and at any rate, prior to 2.39,
g_test_run() would normally not return at all if an error occurred.

https://bugzilla.gnome.org/show_bug.cgi?id=720263
2013-12-18 10:09:46 -05:00
Dan Winship
10d82f9775 gtestutils: rename test_skip_count to test_startup_skip_count
https://bugzilla.gnome.org/show_bug.cgi?id=720263
2013-12-18 10:09:46 -05:00
Dan Winship
8c188fc9e5 gtestutils: skipping a test should count as success, not failure
In particular, the test program as a whole should exit with status 0
if you skipped some tests but did not fail any.

https://bugzilla.gnome.org/show_bug.cgi?id=720263
2013-12-18 09:26:54 -05:00
Bastien Nocera
c300079f13 gdbus-codegen: Fix crasher in goa-using apps
When replacing a version of goa-daemon (from gnome-online-accounts)
by a newer version with some added interfaces, evolution-data-server
and the gvfs-goa volume monitor might crash as there's no interface
definition for this new interface.

Work-around this by returning earlier from the _notify() implementation,
rather than accessing invalid memory.

https://bugzilla.gnome.org/show_bug.cgi?id=720539
2013-12-18 10:53:01 +01:00
Tim Lunn
d33f72097f Make gdb pretty-printers compatible with Python3
On some systems gdb is linked against python3 where "long" no longer
exists. In this case should be using int.

https://bugzilla.gnome.org/show_bug.cgi?id=720635
2013-12-18 07:22:16 +11:00
Damien Lespiau
91d4659bbf gobject.py: Don't install frame filters when GDB does not support them
Stock GDB (both versions 7.0 and 7.1) does not come with the new
backtrace code and python API. To prevent an ugly python backtrace when
auto-loading gobject.py, let's catch the exception and not register the
FrameWrapper and the FrameFilter.

https://bugzilla.gnome.org/show_bug.cgi?id=613732
2013-12-17 10:51:48 -05:00
Matthias Clasen
4846fd923d Bump version 2013-12-17 00:45:41 -05:00
Matthias Clasen
0cfffd597e 2.39.2 2013-12-17 00:30:08 -05:00
Ryan Lortie
6c8600b2b8 valgrind.h: add "r0" to the clobber list on PPC
Looks like the magic sequences trash this register, so make sure GCC
knows that.

https://bugzilla.gnome.org/show_bug.cgi?id=710983
2013-12-16 14:55:28 -05:00
Ryan Lortie
2731b01c73 tests: change test timezone to America/Toronto
America/Toronto is the canonical name for Canada/Eastern in the zoneinfo
database.
2013-12-16 14:55:12 -05:00
Matthias Clasen
5ccdf2b86a Expand the truncate tests
Check that the data is expanded with zeros.
2013-12-15 21:07:12 -05:00
Matthias Clasen
453a69534c Update tests for new truncate behavior 2013-12-15 21:07:12 -05:00
Stef Walter
baed90af43 gdbus-export: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-12-15 21:07:11 -05:00
Stef Walter
db6a297d9e gdbus-auth: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
2013-12-15 21:07:11 -05:00
Colin Walters
2ad121ab16 gsubprocesslauncher: Annotate g_subprocess_launcher_spawnv()
Needs to be an array.
2013-12-15 20:44:53 -05:00
Stef Walter
3f8888d348 sources: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-12-15 19:29:26 -05:00
Matthias Clasen
0b486a49e4 Fix up gsettings test 2013-12-15 18:50:49 -05:00
Ross Lagerwall
3b9ad6e6ef gio: Update GMemoryOutputStream length after truncate
For GMemoryOutputStream, update valid_len when truncating so that
g_memory_output_stream_get_data_size () returns the correct result.

https://bugzilla.gnome.org/show_bug.cgi?id=720080
2013-12-15 11:54:39 -05:00
Matthias Clasen
c34cc2348c Simplify subprocesses in tests
Use the new way of running tests in a subprocess without
registering extra 'subprocess' test cases where appropriate.
2013-12-15 11:50:00 -05:00
Stef Walter
cd2204bb65 gtestutils: Allow clean simple use of g_test_trap_subprocess()
Allow g_test_trap_subprocess() to be used in a simple cases by
rerunning the same test case itself. This is accomplished by
passing %NULL as the test case name.

https://bugzilla.gnome.org/show_bug.cgi?id=720236
2013-12-15 11:03:17 -05:00
Matthias Clasen
162852d1b5 Add a testcase for g_ptr_array_insert 2013-12-14 23:54:18 -05:00
Matthias Clasen
12fbc5ec4a Add g_ptr_array_insert to the docs 2013-12-14 23:45:36 -05:00
Tristan Van Berkom
9ed0d0c509 GPtrArray: Added g_ptr_array_insert()
Speaks for itself, I've found myself on numerous occasions
writing my own version of this, or using a GArray of pointers.

https://bugzilla.gnome.org/show_bug.cgi?id=719395
2013-12-14 23:41:44 -05:00
Chun-wei Fan
6011d0a4ae glib/gwin32.c: Silence a Deprecation Warning
Since we are already building a deprecated function for compatibility
reasons, we don't really need to see a warning when it uses another
deprecated GLib function.
2013-12-13 16:21:00 +08:00
Chun-wei Fan
3af58d2e9f gio/gdbusaddress: Clean up Win32 code a bit
Combine duplicate parts into one, as the symbol used by RunDLL under x64
is the same for either Visual C++ or MinGW-64
2013-12-12 18:00:52 +08:00
Milo Casagrande
c7c1ad4d02 [l10n] Updated Italian translation. 2013-12-12 09:50:46 +01:00
Matthias Clasen
d721d41d38 Remove an unused define
https://bugzilla.gnome.org/show_bug.cgi?id=720210
2013-12-11 10:36:26 -05:00
Martin Pitt
e6c86d58f2 gdesktopappinfo: Add missing annotations
Add missing (allow-none) annotations to
g_desktop_app_info_launch_uris_as_manager(). Tested with

  python -c "from gi.repository import GLib, Gio; Gio.DesktopAppInfo.new('gcalctool.desktop').launch_uris_as_manager([], None, GLib.SpawnFlags.SEARCH_PATH|GLib.SpawnFlags.STDOUT_TO_DEV_NULL, None, None, None, None)"

which is necessary to do a launch_uris() without leaking stdout.

https://launchpad.net/bugs/1259721
2013-12-11 13:17:10 +01:00
Chun-wei Fan
aa7f1ba21a Update Visual C++ "Installation" Phase
Install the Python scripts that is used by gdbus-codegen in
share\glib-2.0\codegen, to be consistent with the other platforms.

Please see https://bugzilla.gnome.org/show_bug.cgi?id=702862 for details
on this.
2013-12-11 20:09:59 +08:00
Manuel Bachmann
36ef409591 gdbus-codegen: look for deps in correct path under win32
codegen.py and friends get installed in "share/glib-2.0",
so look for them there.

https://bugzilla.gnome.org/show_bug.cgi?id=702862
2013-12-11 11:02:33 +01:00
Stef Walter
e6456bcfb6 gdbus-connection: Work around race in connection tests
GDBusConnection cleanup is inherently racy due to its use of worker
threads. Put tests that expect a NULL G_BUS_TYPE_SESSION singleton
as the first tests to work around cleanup races.

https://bugzilla.gnome.org/show_bug.cgi?id=719837
2013-12-11 07:32:03 +01:00
Ryan Lortie
a22f77739d g_get_current_dir(): consult PWD first
Check if the current directory is the same as $PWD.  This matches the
behaviour of the get_current_dir_name() function in glibc.

https://bugzilla.gnome.org/show_bug.cgi?id=705902
2013-12-09 12:10:16 -05:00