mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 23:46:15 +01:00
10a3867a6e
Mon Aug 1 23:33:47 2005 Tim Janik <timj@imendio.com> * tests/refcount/closures.c: test high contention on closure reference counts to trigger and catch non-atomic updates. * tests/refcount/objects.c: * tests/refcount/objects2.c: * tests/refcount/properties.c: * tests/refcount/properties2.c: * tests/refcount/signals.c: fixed up test and threading fundamentals. variables accessed from all threads need to be volatile. context switches are enforced by using g_thread_yield(), not g_usleep(1) which may result in busy waits on some platforms. for testcode, always consider all warnings and critical messages fatal. issue the currently running program on stdout. improved progress indicators. * tests/refcount/properties.c: * tests/refcount/objects.c: don't overdo the number of testing threads to keep the testing machine usable, 2 threads can produce as much contention as 20 if executing the same code. * tests/refcount/signals.c: only start 1 thread per object. GObject doesn't provide mutually exclusive object access, but only mutually exclusive reference count modification. * tests/Makefile.am: added closures test.
40 lines
897 B
Makefile
40 lines
897 B
Makefile
INCLUDES = \
|
|
-I$(top_srcdir) \
|
|
-I$(top_srcdir)/glib \
|
|
-I$(top_srcdir)/gmodule \
|
|
$(GLIB_DEBUG_FLAGS)
|
|
|
|
libglib = $(top_builddir)/glib/libglib-2.0.la
|
|
libgthread = $(top_builddir)/gthread/libgthread-2.0.la
|
|
libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
|
|
libgobject = $(top_builddir)/gobject/libgobject-2.0.la
|
|
|
|
LDADD = $(libgobject) $(libgthread)
|
|
|
|
test_programs = \
|
|
closures \
|
|
objects \
|
|
objects2 \
|
|
properties \
|
|
properties2 \
|
|
signal1 \
|
|
signal2 \
|
|
signal3
|
|
|
|
|
|
|
|
signal1_SOURCES = signals.c
|
|
signal1_CFLAGS = -DTESTNUM=1 $(AM_CFLAGS)
|
|
signal2_SOURCES = signals.c
|
|
signal2_CFLAGS = -DTESTNUM=2 $(AM_CFLAGS)
|
|
signal3_SOURCES = signals.c
|
|
signal3_CFLAGS = -DTESTNUM=3 $(AM_CFLAGS)
|
|
|
|
check_PROGRAMS = $(test_programs)
|
|
|
|
all: $(check_PROGRAMS)
|
|
|
|
TESTS = $(test_programs)
|
|
TESTS_ENVIRONMENT = srcdir=$(srcdir) \
|
|
LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|