Commit Graph

14566 Commits

Author SHA1 Message Date
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
Lars Uebernickel
0f1579e62c g_settings_get: only check for non-copying format string
396d40af introduced a redundant call to g_variant_check_format_string().
Checking whether the format string copies all values is enough.

https://bugzilla.gnome.org/show_bug.cgi?id=719979
2013-12-09 15:51:56 +01:00
Ryan Lortie
05f36e7ffc clang fixes: tweak last commit
We need to actually ignore "-Wformat-nonliteral" to make clang happy
2013-12-08 16:38:47 -05:00
Ryan Lortie
ddf82a2576 [PATCH] Fix trivial non literal format uses
Based on a patch from Henrique Dante de Almeida <hdante@gmail.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=691608
2013-12-08 14:22:51 -05:00
keyring
9044744541 Update Chinese simplified translation 2013-12-07 15:05:26 +08:00
Lars Uebernickel
396d40af23 g_settings_get: check validity of format string
Allow only format strings that copy all values (i.e, don't contain '&'),
as the returned pointers might become invalid in some rare cases.

Since this is technically an API break, this patch only prints a
critical when a faulty format string is detected, but still fetches the
values.

https://bugzilla.gnome.org/show_bug.cgi?id=719979
2013-12-06 16:48:00 +01:00
Philip Withnall
c07eccd9c2 gtestdbus: Add a note about thread safety to the documentation
https://bugzilla.gnome.org/show_bug.cgi?id=712148
2013-12-06 09:41:56 +00:00
Daiki Ueno
7e9e7a66a1 Fix documentation typos in GTask and GCancellable examples
https://bugzilla.gnome.org/show_bug.cgi?id=719884
2013-12-06 07:55:27 +09:00
Colin Walters
8f4dc7012e gsignal: Signal connection ids are always > 0 if successful
Note this explicitly so that people can rely on doing:

if (mystruct->sigid > 0)
  g_signal_disconnect (mystruct->object, mystruct->sigid);

https://bugzilla.gnome.org/show_bug.cgi?id=719809
2013-12-03 19:23:49 -05:00
Marc-André Lureau
b2bf13ccdd gutf8: use g_try_malloc_n
As recommended by Christian Persch.

https://bugzilla.gnome.org/show_bug.cgi?id=711546
2013-12-03 15:56:47 +01:00
Marc-André Lureau
bff76bc36f gmessages: make _g_log_abort() do only breakpoints again
Commit e53caad4 makes _g_log_abort() noreturn by calling abort()
unconditionally.

However, it is useful to be able to skip some log_abort() with a
debugger, to reach a point of interest. Revert back to previous
behaviour. Make g_assert_warning() noreturn by calling abort().

https://bugzilla.gnome.org/show_bug.cgi?id=711800
2013-12-03 15:56:47 +01:00
Matthias Clasen
2baa50ee4f Remove g_trap_instance_signals as well
This is another crude conditional breakpoint mechanism and can
be done better with actual conditional breakpoints or with systemtap
tracepoints.

https://bugzilla.gnome.org/show_bug.cgi?id=719687
2013-12-03 06:00:47 -05:00
Matthias Clasen
28c2706da7 Drop g_trap_object_ref debugging mechanism
This is really just a very crude and limited conditional breakpoint.
Update the documentation to explain conditional breakpoints in
gdb instead. Also, remove the link to refdbg, which appears dead.

https://bugzilla.gnome.org/show_bug.cgi?id=719687
2013-12-02 21:48:03 -05:00