Commit Graph

816 Commits

Author SHA1 Message Date
Christian Persch
b39b19ca20 unicode: Update test data files for unicode 7.0.0
https://bugzilla.gnome.org/show_bug.cgi?id=731929#c2
2014-06-29 20:18:48 +02:00
Ryan Lortie
dce88768dc all: remove use of 'register' keyword
We should have done this a decade ago...

https://bugzilla.gnome.org/show_bug.cgi?id=730293
2014-06-28 13:07:52 -04:00
Daniel Macks
93d0c63232 assert-msg-test: Explicitly quit gdb session to avoid zombie
gdb is run in batch mode, and can leave leave the program being
executed/debugged running when the batchfile is finished. Explicitly
"quit"ing the subprocess prevents it from leaving the stray subprocess
when gdb finishes.

https://bugzilla.gnome.org/show_bug.cgi?id=731366
2014-06-10 08:57:54 -04:00
Matthias Clasen
367dbdce36 Fix the mapping test in continuous
It turns out that due to a recent gdm change, the inherited
signal mask has SIGUSR1 blocked - which is bad news for
tests using SIGUSR1. Fix the test by explicitly checking the
signal mask before using SIGUSR1.
2014-05-30 10:22:35 -04:00
Matthias Clasen
1e28df0264 Add more debug spew to the mapping-test 2014-05-28 06:16:11 -04:00
Matthias Clasen
de1c0722b9 mapping-test: Add debug spew
This might help figuring out why the test is failing in continuous.
2014-05-27 22:13:33 -04:00
Matthias Clasen
922dd548d5 Try to fix mapping-test
The mapping-test is failing under gnome-continuous. I suspect this
is simply due to running many tests in parallel, and mapping-test
being racy. Replace the blind sleep by signals, to avoid the
races.
2014-05-22 17:25:34 -04:00
Colin Walters
4cbee6a35b Restore executability for other files 2014-01-31 09:36:52 -05:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Matthias Clasen
27e352985b Remove broken attempt at parsing date-only
g_time_val_from_iso8601 was attempting to parse strings
having only a date, but failed to actually set the timeval
despite returning TRUE. Since the docs state that the function
only parses strings containing a date and a time, just return
FALSE in this case.

Also remove an incomplete testcase for this behaviour that was
just checking the boolean return value, but not timeval.
2014-01-01 17:59:21 -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
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
Dan Winship
158dde0507 Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX
In Windows development environments that have it, <unistd.h> is mostly
just a wrapper around several other native headers (in particular,
<io.h>, which contains read(), close(), etc, and <process.h>, which
contains getpid()). But given that some Windows dev environments don't
have <unistd.h>, everything that uses those functions on Windows
already needed to include the correct Windows header as well, and so
there is never any point to including <unistd.h> on Windows.

Also, remove some <unistd.h> includes (and a few others) that were
unnecessary even on unix.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
2013-11-20 09:25:39 -05:00
Michael Haubenwallner
b1af471a3f build: Give internal libraries higher precedence
Linking local libraries too late may cause preinstalled libraries to
get found earlier, due to external library paths in .la files.

https://bugzilla.gnome.org/show_bug.cgi?id=712314
2013-11-19 08:11:35 -05:00
Stef Walter
d10f35310f threadpool-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-11 17:37:48 +01:00
Stef Walter
3e041ce5ad mainloop-test: Fix uninitialized memory access in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-11 17:35:26 +01:00
Stef Walter
aa7ec15091 Revert "defaultiface: Fix leak in test"
This reverts commit fd7b2faa64.

This required another patch to be commited first. Will put this
back in bugzilla.
2013-11-11 17:06:38 +01:00
Chun-wei Fan
fd41363e02 tests/: Include unistd.h on *NIX only
https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-11 22:37:39 +08:00
Chun-wei Fan
ccba409d34 tests/: Avoid closing invalid fd's
...and only include unistd.h when we are on *NIX.

Newer Visual C++ runtimes (8.0/2005 and later) will cause the program to
crash with an internal abort() call when they detect instances of close()
being called on an invalid fd, such as when the fd is -1, and these should
be purged anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-11 22:36:32 +08:00
Stef Walter
177fe9f98e timeloop: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-11 08:14:45 +01:00
Stef Walter
9e0ade0691 file-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-11 08:10:51 +01:00
Stef Walter
fd7b2faa64 defaultiface: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:27:22 +01:00
Stef Walter
bac4179476 timeloop-closure: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:27:15 +01:00
Stef Walter
d8722441d1 signals: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:27:01 +01:00
Stef Walter
1b9662046f paramspec-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:53 +01:00
Stef Walter
320f0b32de override: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:37 +01:00
Stef Walter
e6de9c6940 gvalue-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:28 +01:00
Stef Walter
83301d8c1f accumulator: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711779
2013-11-11 07:26:20 +01:00
Stef Walter
6294d73023 module-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711768
2013-11-10 22:53:42 +01:00
Stef Walter
0a02fd9c52 iochannel-test: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:45:04 +01:00
Stef Walter
44bd2ab07e unicode-encoding: Fix leaks in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:44:39 +01:00
Stef Walter
e8cc0966d4 thread-test: Fix leaks in tests
This is a test of deprecated functionality and its age is
showing. Doesn't actually do what it says. But fix leaks anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:44:12 +01:00
Stef Walter
ae1764b4e0 mainloop-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:43:25 +01:00
Stef Walter
83a14d13ec datetime: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:42:57 +01:00
Stef Walter
5ae5d438a6 mapping-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:42:29 +01:00
Stef Walter
fc4630b7ac gio-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:41:44 +01:00
Stef Walter
ee743674a1 completion-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:41:29 +01:00
Stef Walter
ba56c7b720 child-test: Fix leak in test
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:41:16 +01:00
Stef Walter
9a67fb903f asyncqueue-test: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711751
2013-11-10 22:40:58 +01:00
Chun-wei Fan
20f873a0bc tests/libmoduletestplugins*.c: Update Prototypes
Visual C++ does not like function declarations being different from
their prototypes, so make the prototypes match the declarations by
decorating them with G_MODULE_EXPORT.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
2013-11-04 10:31:28 +08:00
Dan Winship
c9ac45a023 .gitignore: add "signals" 2013-09-28 10:39:01 -04:00
Ryan Lortie
9da87f597c fix up refcount/properties test case
Recent changes to the properties testcase made invalid use of the GArray
free function.  This free function takes a pointer to the item to be
freed, not the item itself.  Since that item was a pointer to a GObject,
g_object_unref() was getting a GObject**, rather than a GObject*.

The use of GArray in this testcase is pretty questionable in the first
place, so just use C arrays instead.
2013-09-23 17:07:33 -04:00
Ray Strode
29ef821766 tests: add signal disconnection test
This commit adds a test to ensure that during a signal emission, if
a signal handler gets disconnected, it won't be run, even if it would
have run before the disconnection.
2013-09-20 16:06:02 -04:00
Ray Strode
cb7059e17f tests: free properties test object from main thread instead of helper thread
The test objects are used from the main thread after the helper threads
are destroyed, so we need to keep them alive until we're done using them.
2013-09-20 16:06:02 -04:00
Matthias Clasen
d929eb64ee Try to make the testgdate test hobble along a little longer 2013-06-17 12:40:47 -04:00
Ryan Lortie
601a00fa2a Change a pair of TESTS = to TEST += 2013-06-01 09:55:13 -04:00
Ryan Lortie
f9eb9eed10 Rework the build system for a new tests approach
Perform a substantial cleanup of the build system with respect to
building and installing testcases.

First, Makefile.decl has been renamed glib.mk and substantially
expanded.  We intend to add more stuff here in the future, like canned
rules for mkenums, marshallers, resources, etc.

By default, tests are no longer compiled as part of 'make'.  They will
be built when 'make check' is run.  The old behaviour can be obtained
with --enable-always-build-tests.

--disable-modular-tests is gone (because tests are no longer built by
default).  There is no longer any way to cause 'make check' to be a
no-op, but that's not very useful anyway.

A new glibtests.m4 file is introduced.  Along with glib.mk, this
provides for consistent handling of --enable-installed-tests and
--enable-always-build-tests (mentioned above).

Port our various test-installing Makefiles to the new framework.

This patch substantially improves the situation in the toplevel tests/
directory.  Things are now somewhat under control there.  There were
some tests being built that weren't even being run and we run those now.
The long-running GObject performance tests in this directory have been
removed from 'make check' because they take too long.

As an experiment, 'make check' now runs the testcases on win32 builds,
by default.  We can't run them under gtester (since it uses a pipe to
communicate with the subprocess) so just toss them in TESTS.  Most of
them are passing on win32.

Things are not quite done here, but this patch is already a substantial
improvement.  More to come.
2013-05-31 23:12:15 -04:00
Ryan Lortie
210b1f8b42 Remove a bunch of lingering g_thread_init()
After this patch, there is but one remaining use of g_thread_init(),
which is in tests/slice-threadinit.c, a testcase dedicated to testing
the functionality of gslice across a g_thread_init() boundary.

This testcase is pretty meaningless these days... probably we should
delete it.
2013-05-31 23:03:19 -04:00
Ryan Lortie
e66abbe2ef Some final g_test_build_filename() porting
This should be the last users that need to be ported.

For some of the oldschool non-gtester-ified tests, we call g_test_init()
from main() because it is necessary in order to use
g_test_build_filename().
2013-05-31 23:03:19 -04:00
Ryan Lortie
d7b3e558cf Move a pair of gobject tests to tests/gobject/
testgobject.c and timeloop-closure.c are the only two tests in the
toplevel tests/ directory that depend on gobject, so move them to
tests/gobject/ along with the other gobject tests.

Both of these were in noinst_PROGRAMS and not TESTS, so keep them that
way when we move them.
2013-05-31 23:03:19 -04:00