Commit Graph

15239 Commits

Author SHA1 Message Date
Ryan Lortie
028856a99f build: fix 'make distclean'
Don't run a non-existent lcov command to clean up during 'make distclean'
2014-01-13 16:43:12 -05:00
Ryan Lortie
4130118a72 giomodule test: fix again
The compiled modules will be in the G_TEST_BUILT directory, not _DIST.
2014-01-13 16:12:31 -05:00
Ryan Lortie
186965fc9b giomodule test: force shared library build
http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html hit
us again.  libtool only builds .so files if we install the library, so
force it to build for our testcase, even if we don't install it.
2014-01-13 15:31:38 -05:00
Rico Tzschichholz
60cca82c9d gdesktopinfo: Fix typo in "Since" annotation of has_key 2014-01-13 12:33:35 +01:00
Dimitris Spingos
fb087feb4d Updated Greek translation 2014-01-13 10:25:01 +02:00
Yosef Or Boczko
3d8ec7a7db Updated Hebrew translation 2014-01-13 08:59:04 +02:00
Ryan Lortie
d751e65aff tests: fix leaks in option-context test
Use the new g_option_context_parse_strv() to patch up some leaks in some
insufficiently-argv-emulating testcases in option-context.c.

This gives some test coverage of the new function while also making
option-context now leak-free.

https://bugzilla.gnome.org/show_bug.cgi?id=721947
2014-01-10 12:32:35 -05:00
Ryan Lortie
f062fae4d6 GOptionContext: add memory-friendly parse mode
Add g_option_context_parse_strv() that obeys the normal memory conventions for
dealing with a strv instead of assuming that we're dealing with the 'argv'
parameter to main().

This will help for using GOptionContext with GApplication.

https://bugzilla.gnome.org/show_bug.cgi?id=721947
2014-01-10 12:32:35 -05:00
Ryan Lortie
d3017967d8 GApplication: allow handles_commandline and service
The default local_command_line handler has a fast return path for the
case that we handle the commandline by forwarding it to the primary
instance, but this doesn't account for the fact that we may want to
become a service.

Allow for this by making sure we don't take the fast path of the service
flag is set.
2014-01-10 11:17:44 -05:00
Ryan Lortie
e8b7dd32fc GApplication: add --gapplication-service switch
Add a --gapplication-service switch to the default implementation of
local_command_line.  This name is unlikely to clash with any option used
by an existing application.

When a normal application (neither service nor launcher) is launched with
exactly this one argument, G_APPLICATION_IS_SERVICE will be set.

The idea is that people will write their D-Bus service file with
--gapplication-service on the Exec line.  This provides a nice
compromise for people who want the benefits of DBusActivatable
applications but without losing the ability to easily run them directly
(under the debugger or inside jhbuild, etc.)

https://bugzilla.gnome.org/show_bug.cgi?id=710965
2014-01-09 16:15:53 -05:00
Ryan Lortie
8bc63b0ef0 gdbus-introspection test: test escaping attributes
Make sure attribute values are properly escaped in generated XML.

https://bugzilla.gnome.org/show_bug.cgi?id=721796
2014-01-08 22:58:06 -05:00
Ryan Lortie
04ee782486 gdbus: properly escape introspection annotations
Make sure we escape any special characters that are found in annotation
names or values to avoid emitting a malformed XML document in response
to an Introspect call.

https://bugzilla.gnome.org/show_bug.cgi?id=721796
2014-01-08 22:58:06 -05:00
Matthias Clasen
3872049445 Add includes to all gio docs 2014-01-07 22:55:43 -05:00
Dan Winship
86497649bb Document g_test_run() order better, and how it changed
But also note that the ordering is strictly an aesthetic/convenience
thing, and that tests should not be written to depend on it.

https://bugzilla.gnome.org/show_bug.cgi?id=721624
2014-01-07 12:32:35 -05:00
Claudio Saavedra
0e109fceab glib/tests: fix build 2014-01-07 11:33:14 +02:00
Chun-wei Fan
6bd30a4cb9 glib/tests/keyfile.c: Use g_close()
Use g_close() instead, as close() is really found in io.h on Windows, not
unistd.h as on Unix, and hence unistd.h is not universally available.

https://bugzilla.gnome.org/show_bug.cgi?id=719344
2014-01-07 13:36:31 +08:00
Chun-wei Fan
8bb81e7024 glib/tests/date.c: Fix the tests on non-English Windows
The names of the month (and abbreviations) are specific to the Windows
system locale, so we need to use SetThreadLocale() to set the locale of
the running program to en-US so that it will parse "March" and "Sept" etc.
correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=719344
2014-01-07 13:35:16 +08:00
Ryan Lortie
210f96dfcf Fix one-character typo in old NEWS entry
Change a very confusing typo "will not" -> "will now" about the
g_critical() on removing non-existent sources.

https://bugzilla.gnome.org/show_bug.cgi?id=721625
2014-01-06 14:00:17 -05:00
Chun-wei Fan
eb7ef594de Fix GLib MSVC Project
The glib/gthread-win32.c was accidently removed from the last commit, sorry
2014-01-06 12:31:18 +08:00
Chun-wei Fan
940b3c2250 Tidy Up the glib MSVC Project
Move the per-source define/undefine cflags into the property sheets, and
apply the cflags for the bundled PCRE sources to the PCRE sources only
2014-01-06 12:21:46 +08:00
Chun-wei Fan
16c41f0c36 Drop the testglib MSVC Projects
There are many test programs that are shipped with GLib, and this project
is a one-to-one project, which does not make sense to keep as various test
programs may have different CFLAGS, etc, which will require different build
options.
2014-01-06 11:22:39 +08:00
Matthias Clasen
71c9ea42f8 Use tap mode for installed tests too, when using tap 2014-01-04 21:09:18 -05:00
Rico Tzschichholz
b3253fe025 glib/tests: Fix non-debug build of slice test
In addition to e013cf9cad
2014-01-04 18:46:52 -05:00
Jasper St. Pierre
33f81cc509 tests/keyfile: Fix build 2014-01-04 01:40:27 -05:00
Chun-wei Fan
589aed9383 gio/tests/giomodule.c: Use G_MODULE_SUFFIX
The file extension of the GIO module could be something other than .so,
depending on platform.  Use G_MODULE_SUFFIX so that the test will run
correctly on non-*nix platforms, such as Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=719344
2014-01-04 10:44:17 +08:00
Chun-wei Fan
3fd6edab66 Fix the Keyfile Test on Windows
Windows will not allow one to write to a temp file opened by g_mkstemp()
by opening another fd associated with it before one closes the fd that
is returned by g_mkstemp(), which will cause the test_save test to fail.

Fix this by using a variable to store the fd from g_mkstemp() and checking
it, and call close() on that variable before attempting to call
g_key_file_save_to_file() on the temp file as that will attempt to open
another fd (which would not work) associated with that temp file.

https://bugzilla.gnome.org/show_bug.cgi?id=719344
2014-01-04 10:42:28 +08:00
Michael Catanzaro
6448f87552 docs: fix two typos 2014-01-02 19:40:47 -06:00
Ryan Lortie
1867fc210f unix signals: stop using atomics
They are not required here.  See the discussion in the bug report.

https://bugzilla.gnome.org/show_bug.cgi?id=711090
2014-01-02 20:38:40 -05:00
Rafael Ferreira
23ec1b9aca Updated Brazilian Portuguese translation 2014-01-02 22:08:14 -02:00
Matthias Clasen
2b289cc565 Fix make install with --disable-installed-tests
If installed tests are not enabled, installed_testdir is not
defined, so we end up trying to create /modules and to chmod
things in /x-content/, which is not right.
2014-01-02 13:36:37 -05:00
Ryan Lortie
c09cfc1c8a GFile: fix uninitialised variable
clang cause the fact that some of our 'goto out;' cases cause use to try
and free an uninitialised GString.  Fix that up.
2014-01-02 12:54:12 -05:00
Ryan Lortie
51b3dd7332 GDBusConnection: don't write to stdout
When losing the D-Bus connection, we would write to stdout about it just
before killing ourselves with SIGTERM.  We're a library, so we should
probably use stderr instead.

https://bugzilla.gnome.org/show_bug.cgi?id=721324
2014-01-02 10:08:55 -05:00
Ryan Lortie
8976175ba9 gsettings: tweak test for last commit
The last commit changed the behaviour of child objects of delayed
GSettings.  Adjust the testcase accordingly.
2014-01-02 01:55:07 -05:00
Ryan Lortie
c7636ce64b g_settings_get_child(): inherit backend
Part of the purpose of g_settings_get_child() was that it could be used
after you delay() a GSettings object, and then apply() all of the
settings together.  In order for that to work, we need to share the
backend.

https://bugzilla.gnome.org/show_bug.cgi?id=720891
2014-01-02 01:50:40 -05:00
Matthias Clasen
d25b655bf5 Make symlink test work installed
We can't assume that the location used for G_TEST_DIST paths
is writable, so just create the symlink in the current directory
instead.
2014-01-01 23:28:23 -05:00
Matthias Clasen
d91023fb4c Drop locale-dependent timeval tests 2014-01-01 22:39:32 -05:00
Matthias Clasen
11ddb843b9 Make /contenttype/tree test work installed
The x-content/win32-software type is only recognized if
the autorun.exe file is executable. Since the file is installed
as data, we need to fix up its permissions in an
install-data-hook.
2014-01-01 22:30:24 -05:00
Matthias Clasen
dba1ae12a8 Avoid a compiler warning 2014-01-01 22:01:15 -05:00
Matthias Clasen
6106e38c8e Make timeval tests independent of the environment
Some of the tested formats are locale-dependent, so unset
the TZ environment variable before testing them.
2014-01-01 21:41:16 -05:00
Chun-wei Fan
cda4080af0 MSVC 2012 Projects: Rename a Property Sheet
Forgot to update the property sheet file name from the Visual Studio 2010
update... Sorry!
2014-01-02 09:54:18 +08:00
Ryan Lortie
76584e7ae3 Fix races in unix signal dispatch
Fix some races introduced in be2c7b83c4
while keeping the property that multiple handlers for the same unix
signal all get dispatched.

Also fix the behaviour of the source checking for pending signals when
it's created.  No matter what we do here (clear the pending flag or not)
there is something that can go wrong.

If we clear the flag, we may prevent other sources from being
dispatched.  If we don't clear it, we may end up dispatching the same
source twice (if we manage to dispatch it from its own thread before the
GLib worker has a chance to run).

Instead, run the full dispatch procedure when a new source is added.  It
actually doesn't matter what thread this runs in since the lock is held.

https://bugzilla.gnome.org/show_bug.cgi?id=711090
2014-01-01 19:19:59 -05:00
Colin Walters
97d9138f6c gio/tests: Fix usage of BUILT_SOURCES 2014-01-01 19:05:34 -05:00
Yosef Or Boczko
52cefa239d Fix doc build 2014-01-02 01:40:26 +02:00
Matthias Clasen
f9f7ad2557 Improve gutils.c test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
3de604d438 Improve GDate test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
5e6d86877d Improve GIOChannel test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
5ec36cd02a Improve hostutils test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
baceea9582 Improve GVariant test coverage 2014-01-01 17:59:22 -05:00
Matthias Clasen
ec0d6d7812 Test stdio wrappers 2014-01-01 17:59:22 -05:00
Matthias Clasen
93dad4808e Trivial typo fix 2014-01-01 17:59:22 -05:00