Commit Graph

164 Commits

Author SHA1 Message Date
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
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
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
Matthias Clasen
4c9a7b65eb More test fixes for builddir != srcdir 2013-05-27 22:05:19 -04:00
Colin Walters
0b167b0ae9 build: Fix usage of %.test again
We actually need the first dependency because it includes the
final executable name.  Rather, fix the original bug by using
the variable $(EXEEXT).
2013-05-24 22:16:44 +01:00
Colin Walters
5088c705ac tests: Drop unnecessary % from .test pattern match rule
On Windows, the executables will have .exe, so this won't
match.  Furthermore, they aren't actually dependent on the
executable to build.
2013-05-24 16:30:21 -04:00
Matthias Clasen
7ff5c08221 Convert more tests to installed tests
This makes the tests in tests installed, except for
the performance tests.
2013-05-20 23:41:49 -04:00
Dan Winship
e3d1869ee3 tests: port from g_test_trap_subprocess() to g_test_trap_fork()
https://bugzilla.gnome.org/show_bug.cgi?id=679683
2013-05-13 12:10:52 -04:00
Matthias Clasen
a605b332c5 Dist assert-msg-test.gdb
And refer to it in srcdir. Otherwise, the test fails mysteriously
in make distcheck.
2013-01-14 23:48:33 -05:00
Matthias Clasen
86610b0594 Move testgobject to tests/
And fix it to actually check the right things.
2013-01-01 14:06:20 -05:00
Matthias Clasen
0178402c6d Revert "tests: port from g_test_trap_subprocess() to g_test_trap_fork()"
This reverts commit ea06ec8063.
2012-12-19 15:20:37 -05:00
Dan Winship
ea06ec8063 tests: port from g_test_trap_subprocess() to g_test_trap_fork()
(or, in a few cases, to g_test_expect_message())

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:10 -05:00
Arnel A. Borja
4a506290a7 win32: Use AC_CHECK_TOOL to find dlltool
https://bugzilla.gnome.org/show_bug.cgi?id=684145
2012-12-02 18:12:57 +01:00
Dan Winship
56de38da7d tests: add a timing test for adding lots of GSources
https://bugzilla.gnome.org/show_bug.cgi?id=619329
2012-06-26 08:40:31 -04:00
Ryan Lortie
ef6371ff74 tests/Makefile.am: remove unused LDFLAGS variable 2011-10-15 13:13:13 -04:00
Ryan Lortie
fd382156b8 tests: disable deprecation warnings for tests
We need to test deprecated functions, so don't warn us for doing so.
2011-10-13 10:51:35 -04:00
Ryan Lortie
9793708931 drop errorcheck mutex test
We don't support errorchecking mutexes in GLib anymore.
2011-10-04 18:52:55 -04:00
Matthias Clasen
76856241d0 Add a quick utility to test datetime formatting 2011-08-21 21:33:30 -04:00
Matthias Clasen
e5c986cbcf Only remove the lines that are no longer needed 2011-05-03 12:41:11 -04:00
Matthias Clasen
5d1aba2464 Revert "[build] Remove stale LDADD lines from tests/Makefile.am to allow build"
This reverts commit b0874ce28e.
2011-05-03 12:37:45 -04:00
Dan Winship
33c0877adc Add back an erroneously-removed line to tests/Makefile.am 2011-05-02 17:06:37 -04:00
Behdad Esfahbod
b0874ce28e [build] Remove stale LDADD lines from tests/Makefile.am to allow build
Automake 1.11 wasn't happy.
2011-05-02 11:43:18 -04:00
Ryan Lortie
b3b7ea8e22 Replace -I with $(glib_INCLUDES) and friends
Stop using ad hoc -I in all of our Makefile.am.  Use the new variables
instead.
2010-08-06 13:10:34 -04:00
paul
9f6faaffb6 Add $(top_builddir)/glib to includes
This is required to find glibconfig.h during srcdir != builddir builds
2010-08-05 09:08:34 -04:00
Matthias Clasen
e4b5104003 Move bookmarkfile tests to the test framework 2010-08-03 10:25:54 -04:00
Matthias Clasen
03be0d7237 Move markup parse tests to the test framework 2010-07-30 19:51:21 -04:00
Matthias Clasen
13ac9f94fd Add some more GFile tests 2010-07-30 19:51:19 -04:00
Matthias Clasen
c972d4df64 Move markup escape tests to test framework 2010-07-30 19:51:18 -04:00
Matthias Clasen
d0750c9d6e Don't leak in converter test 2010-07-30 19:51:18 -04:00
Matthias Clasen
9fc3c980cc Add some volume monitor tests
Although not much of this is easily testable.
2010-07-30 19:51:17 -04:00
Matthias Clasen
e5a72ae3c4 Move queue tests to the test framework 2010-07-30 19:51:17 -04:00
Matthias Clasen
b720732059 Move uri tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
953962d783 Move tree tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
5123bc69e7 Move slist tests to the test framework 2010-07-05 23:13:18 -04:00
Matthias Clasen
26e29cb360 Move charset conversion tests to the test framework 2010-07-04 20:51:06 -04:00
Matthias Clasen
e26b92b947 Move node tests to the test framework 2010-06-23 09:25:29 -04:00
Matthias Clasen
5c1b3a0263 Move date tests to the test framework 2010-06-23 09:25:29 -04:00
Matthias Clasen
2f438f18ae Move hash tests to the test framework 2010-06-21 23:08:01 -04:00
Matthias Clasen
5629366c3d Move checksum tests to the test framework 2010-06-21 23:08:01 -04:00
Matthias Clasen
7bea2a7a4f Move utf8 validation tests to the test framework 2010-06-20 21:16:24 -04:00
Matthias Clasen
5b08ef84e4 Move utf8 pointer tests to test framework 2010-06-20 21:04:47 -04:00
Matthias Clasen
0ed575213b Consolide base64 tests in a single file 2010-06-20 16:53:39 -04:00
Matthias Clasen
08d6e535be Move scanner tests to glib/tests 2010-06-20 16:53:38 -04:00
Matthias Clasen
f849dbac05 Move regex tests to the g_test framework 2010-06-20 11:20:54 -04:00
Martin Pitt
3658727cfa always use our own internal assertion message symbol
Re-using glibc's __abort_msg symbol causes linking problems, since the symbol
is declared private. Always use our own__glib_abort_msg symbol to store
assertion messages, to avoid compatibility and linking problems.

Also fix the test case to work with out of tree builds (such as "make
distcheck"), and re-enable it.

https://bugzilla.gnome.org/show_bug.cgi?id=594872
2010-01-26 11:22:31 +01:00
Matthias Clasen
975aea7bce Disable yet another failing test that was recently added... 2010-01-25 14:13:48 -05:00
Martin Pitt
da66897950 Support storing assertion messages into core dump
Crash interception/debugging systems like Apport or ABRT capture core dumps for
later crash analysis. However, if a program exits with an assertion failure,
the core dump is not useful since the assertion message is only printed to
stderr.

glibc recently got a patch which stores the message of assert() into the
__abort_msg global variable.
(http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=48dcd0ba)
That works fine for programs which actually use the standard C assert() macro.

This patch adds the same functionality for glib's assertion tests. If we are
building against a glibc which already has __abort_msg (2.11 and later, or
backported above git commit), use that, otherwise put it into our own field
__glib_assert_msg.

Usage:

  $ cat test.c
  #include <glib.h>

  int main() {
      g_assert(1 < 0);
      return 0;
  }

  $ ./test
  **ERROR:test.c:5:main: assertion failed: (1 < 0)
  Aborted (Core dumped)

  $ gdb --batch --ex 'print (char*) __abort_msg' ./test core
  [...]
  $1 = 0x93bf028 "ERROR:test.c:5:main: assertion failed: (1 < 0)"

https://bugzilla.gnome.org/show_bug.cgi?id=594872
2009-12-23 15:51:11 +00:00
Matthias Clasen
5694ab7642 Revert "Move gio tests from gio/tests/ to tests/gio/"
This reverts commit 2262d76b33.

Move GIO tests back to where they belong.
2009-07-05 22:49:24 -04:00
Benjamin Otte
2262d76b33 Move gio tests from gio/tests/ to tests/gio/
This avoids getting tests built every time when working on libgio and
running make in the gio/ directory.
2009-07-01 19:03:19 +02:00
Dan Winship
92ac8d165e Misc warning fixes
glib/pcre/pcre_ucp_search_funcs.c, glib/pcre/pcre_valid_utf8.c: add
back missing config.h includes, and this time add them to the copies
in glib/update-pcre/ too so they don't get lost again on the next PCRE
update.

glib/garray.c, glib/gbase64.c: fix signed/unsigned pointer casts

gio/xdgmime/xdgmimeglob.c: remove unused variable

gio/tests/live-g-file.c: fix printf args on x86_64

tests/Makefile.am, tests/regex-test.c: remove redundant -DENABLE_REGEX
2009-05-01 10:37:45 -04:00