Commit 2dc08ada authored by 15:39:40  Tim Janik's avatar 15:39:40 Tim Janik Committed by Tim Janik

call g_test_init() from gtk_test_init().

2007-11-22 15:39:40  Tim Janik  <timj@imendio.com>

        * gtk/gtktestutils.c: call g_test_init() from gtk_test_init().

        * gtk/tests/testing.c: use g_test_add_func() to register tests and use
	g_test_run() to run the tests to integrate with the testing framework.

        * gtk/tests/Makefile.am: removed exemplary testing rules.

        * Makefile.am, gtk/tests/Makefile.am, gtk/Makefile.am:
        * gtk/xdgmime/Makefile.am, gtk/theme-bits/Makefile.am:
        * tests/Makefile.am, docs/reference/gdk-pixbuf/Makefile.am:
        * docs/reference/gdk/Makefile.am, docs/reference/gtk/Makefile.am:
        * docs/reference/Makefile.am, docs/tools/Makefile.am:
        * docs/tutorial/Makefile.am, docs/faq/Makefile.am, docs/Makefile.am:
        * gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/Makefile.am:
        * demos/gtk-demo/Makefile.am, demos/Makefile.am:
        * modules/input/Makefile.am, modules/printbackends/file/Makefile.am:
        * modules/printbackends/test/Makefile.am, modules/printbackends/Makefile.am:
        * modules/printbackends/cups/Makefile.am, modules/printbackends/lpr/Makefile.am:
        * modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am:
        * modules/engines/ms-windows/Theme/Makefile.am:
        * modules/engines/ms-windows/Makefile.am:
        * modules/engines/Makefile.am,  modules/engines/pixbuf/Makefile.am:
        * modules/Makefile.am, m4macros/Makefile.am, perf/Makefile.am:
        * contrib/Makefile.am, contrib/gdk-pixbuf-xlib/Makefile.am:
        * gdk/directfb/Makefile.am, gdk/linux-fb/Makefile.am:
        * gdk/quartz/Makefile.am, gdk/win32/rc/Makefile.am:
        * gdk/win32/Makefile.am, gdk/x11/Makefile.am, gdk/Makefile.am:
	include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.



svn path=/trunk/; revision=19033
parent b5b038af
2007-11-22 15:39:40 Tim Janik <timj@imendio.com>
* gtk/gtktestutils.c: call g_test_init() from gtk_test_init().
* gtk/tests/testing.c: use g_test_add_func() to register tests and use
g_test_run() to run the tests to integrate with the testing framework.
* gtk/tests/Makefile.am: removed exemplary testing rules.
* Makefile.am, gtk/tests/Makefile.am, gtk/Makefile.am:
* gtk/xdgmime/Makefile.am, gtk/theme-bits/Makefile.am:
* tests/Makefile.am, docs/reference/gdk-pixbuf/Makefile.am:
* docs/reference/gdk/Makefile.am, docs/reference/gtk/Makefile.am:
* docs/reference/Makefile.am, docs/tools/Makefile.am:
* docs/tutorial/Makefile.am, docs/faq/Makefile.am, docs/Makefile.am:
* gdk-pixbuf/pixops/Makefile.am, gdk-pixbuf/Makefile.am:
* demos/gtk-demo/Makefile.am, demos/Makefile.am:
* modules/input/Makefile.am, modules/printbackends/file/Makefile.am:
* modules/printbackends/test/Makefile.am, modules/printbackends/Makefile.am:
* modules/printbackends/cups/Makefile.am, modules/printbackends/lpr/Makefile.am:
* modules/engines/ms-windows/Theme/gtk-2.0/Makefile.am:
* modules/engines/ms-windows/Theme/Makefile.am:
* modules/engines/ms-windows/Makefile.am:
* modules/engines/Makefile.am, modules/engines/pixbuf/Makefile.am:
* modules/Makefile.am, m4macros/Makefile.am, perf/Makefile.am:
* contrib/Makefile.am, contrib/gdk-pixbuf-xlib/Makefile.am:
* gdk/directfb/Makefile.am, gdk/linux-fb/Makefile.am:
* gdk/quartz/Makefile.am, gdk/win32/rc/Makefile.am:
* gdk/win32/Makefile.am, gdk/x11/Makefile.am, gdk/Makefile.am:
include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.
2007-11-22 Matthias Clasen <mclasen@redhat.com>
* modules/printbackends/cups/gtkcupsutils.c: Fix a casting problem.
......
## Makefile.am for GTK+
include $(top_srcdir)/Makefile.decl
SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
......@@ -6,7 +7,7 @@ SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
# require automake 1.4
AUTOMAKE_OPTIONS = 1.7
EXTRA_DIST = \
EXTRA_DIST += \
HACKING \
makecopyright \
NEWS.pre-1-0 \
......
include $(top_srcdir)/Makefile.decl
SUBDIRS =
if USE_X11
......
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
......@@ -36,4 +38,4 @@ libgdk_pixbuf_xlibinclude_HEADERS = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gdk-pixbuf-xlib-2.0.pc
EXTRA_DIST = gdk-pixbuf-xlib-2.0.pc.in
EXTRA_DIST += gdk-pixbuf-xlib-2.0.pc.in
## Makefile.am for gtk+/demos
include $(top_srcdir)/Makefile.decl
SUBDIRS = gtk-demo
......@@ -70,7 +71,7 @@ testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
testanimation_SOURCES = testanimation.c pixbuf-init.c
pixbuf_demo_SOURCES = pixbuf-demo.c pixbuf-init.c
EXTRA_DIST = \
EXTRA_DIST += \
apple-red.png \
background.jpg \
gnome-applets.png \
......
## Makefile.am for gtk+/demos
include $(top_srcdir)/Makefile.decl
democodedir=$(datadir)/gtk-2.0/demo
......@@ -60,7 +61,7 @@ bin_PROGRAMS = gtk-demo
BUILT_SOURCES = demos.h
EXTRA_DIST = \
EXTRA_DIST += \
$(IMAGEFILES) \
demo.ui
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
SUBDIRS = tutorial faq reference tools
EXTRA_DIST = \
EXTRA_DIST += \
defsformat.txt \
developers.txt \
dnd_internals.txt \
......
EXTRA_DIST = \
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
gtk-faq.sgml
if HAVE_DOCBOOK
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
SUBDIRS = gdk-pixbuf gdk gtk
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
AUTOMAKE_OPTIONS = 1.6
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
AUTOMAKE_OPTIONS = 1.6
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
AUTOMAKE_OPTIONS = 1.6
......
include $(top_srcdir)/Makefile.decl
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir)/gdk \
......
include $(top_srcdir)/Makefile.decl
.PHONY: html pdf
EXTRA_DIST = \
EXTRA_DIST += \
gtk-tut.sgml \
images/arrow.png \
images/aspectframe.png \
......
include $(top_srcdir)/Makefile.decl
SUBDIRS = pixops
......@@ -482,7 +483,7 @@ distclean-local:
rm -f $(MAINTAINERCLEANFILES); \
fi
EXTRA_DIST = \
EXTRA_DIST += \
gdk-pixbuf-csource.1 \
makefile.msc \
gdk-pixbuf.symbols \
......
include $(top_srcdir)/Makefile.decl
noinst_LTLIBRARIES = libpixops.la
INCLUDES = \
......@@ -25,7 +27,7 @@ libpixops_la_SOURCES = \
pixops-internal.h \
$(mmx_sources)
EXTRA_DIST = \
EXTRA_DIST += \
DETAILS \
pixbuf-transform-math.ltx \
makefile.msc
## Makefile.am for gtk+/gdk
include $(top_srcdir)/Makefile.decl
SUBDIRS = $(gdktarget)
DIST_SUBDIRS = win32 x11 quartz directfb
EXTRA_DIST = \
EXTRA_DIST += \
keynames.txt \
keyname-table.h \
gen-keyname-table.pl \
......
## Makefile.am for gtk+/gdk/gdk-directfb
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-2.0/gdk
......@@ -52,4 +53,4 @@ libgdkinclude_HEADERS = \
gdkprivate-directfb.h
EXTRA_DIST = AUTHORS README TODO
EXTRA_DIST += AUTHORS README TODO
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
bin_PROGRAMS =
......@@ -80,4 +81,4 @@ gdkfbmanager_LDFLAGS = $(GLIB_LIBS)
gdkfbswitch_sources = gdkfbswitch.c
gdkfbswitch_LDFLAGS = $(GLIB_LIBS)
EXTRA_DIST=x-cursors.xbm
EXTRA_DIST += x-cursors.xbm
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-2.0/gdk
INCLUDES = \
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-2.0/gdk
......@@ -19,7 +20,7 @@ noinst_LTLIBRARIES = libgdk-win32.la
SUBDIRS=rc
EXTRA_DIST = \
EXTRA_DIST += \
bdfcursor.c \
makefile.msc
......
EXTRA_DIST = \
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
gdk.rc \
gdk.rc.in \
gtk.ico
......
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-2.0/gdk
......@@ -76,7 +77,7 @@ TESTS = checksettings
# We need to include all these C files here since the conditionals
# don't seem to be correctly expanded for the dist files.
EXTRA_DIST = \
EXTRA_DIST += \
gdkinput-x11.c \
gdkinput-xfree.c \
gdkinput-none.c \
......
# Makefile.am for gtk+/gtk
include $(top_srcdir)/Makefile.decl
SUBDIRS = theme-bits . tests
......@@ -746,7 +747,7 @@ gtk_extra_sources = \
#
MAINTAINERCLEANFILES = $(gtk_built_sources) $(stamp_files) $(GENERATED_ICONS)
EXTRA_HEADERS =
EXTRA_DIST = $(gtk_private_h_sources) $(gtk_extra_sources)
EXTRA_DIST += $(gtk_private_h_sources) $(gtk_extra_sources)
EXTRA_DIST += $(gtk_built_sources)
EXTRA_DIST += $(STOCK_ICONS)
......
......@@ -50,6 +50,7 @@ gtk_test_init (int *argcp,
char ***argvp,
...)
{
g_test_init (argcp, argvp, NULL);
/* - enter C locale
* - call g_test_init();
* - call gtk_init();
......
include $(top_srcdir)/Makefile.decl
INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir)/gdk \
......@@ -16,37 +18,9 @@ progs_ldadd = $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib)
GTESTER = gtester
TEST_PROGS =
noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += testing
testing_SOURCES = testing.c
testing_LDADD = $(progs_ldadd)
# Xvfb based test rules
XVFB = Xvfb
test-xvfb:
${XVFB} -help 2>/dev/null 1>&2 \
&& XID=`for id in \`seq 101 199\` ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \
&& { ${XVFB} :$$XID -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \
trap "kill -15 $$! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } \
|| { echo Failed to start Xvfb environment for testing; false; } \
&& set -e ; for prg in ${TEST_PROGS} ; do DISPLAY=:$$XID ./$$prg ; done
# exemplary unit test rules
test:
set -e ; for prg in ${TEST_PROGS} ; do ./$$prg ; done
######### ${GTESTER} --verbose ${TEST_PROGS}
test-report:
$(MAKE) test
######### ${GTESTER} --verbose -k -o testreport.xml ${TEST_PROGS}
.PHONY: test test-report
check-local: test
......@@ -222,11 +222,11 @@ main (int argc,
{
gtk_test_init (&argc, &argv);
gtk_test_register_all_types();
test_text_access();
test_button_clicks();
test_button_keys();
test_slider_ranges();
test_xserver_sync();
test_spin_button_arrows();
return 0;
g_test_add_func ("/ui-tests/text-access", test_text_access);
g_test_add_func ("/ui-tests/button-clicks", test_button_clicks);
g_test_add_func ("/ui-tests/keys-events", test_button_keys);
g_test_add_func ("/ui-tests/slider-ranges", test_slider_ranges);
g_test_add_func ("/ui-tests/xserver-sync", test_xserver_sync);
g_test_add_func ("/ui-tests/spin-button-arrows", test_spin_button_arrows);
return g_test_run();
}
include $(top_srcdir)/Makefile.decl
INCLUDES = -I$(top_srcdir) -I$(top_builddir) \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
$(GDK_PIXBUF_DEP_CFLAGS)
......@@ -7,4 +9,4 @@ noinst_PROGRAMS = decompose-bits
decompose_bits_SOURCES = decompose-bits.c
decompose_bits_LDADD = $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
EXTRA_DIST = check-13.png check-13-inconsistent.png radio-13.png radio-13-inconsistent.png
EXTRA_DIST += check-13.png check-13-inconsistent.png radio-13.png radio-13-inconsistent.png
include $(top_srcdir)/Makefile.decl
INCLUDES = -DXDG_PREFIX=_gtk_xdg
noinst_LTLIBRARIES = libxdgmime.la
......
include $(top_srcdir)/Makefile.decl
installed_m4= gtk-2.0.m4
EXTRA_DIST=$(installed_m4)
EXTRA_DIST += $(installed_m4)
m4datadir = $(datadir)/aclocal
m4data_DATA = $(installed_m4)
include $(top_srcdir)/Makefile.decl
if OS_UNIX
PRINTBACKENDS_SUBDIR=printbackends
endif
......
include $(top_srcdir)/Makefile.decl
if USE_WIN32
wimp = ms-windows
endif
......
include $(top_srcdir)/Makefile.decl
SUBDIRS=Theme
EXTRA_DIST=Makefile.msc
EXTRA_DIST += Makefile.msc
INCLUDES = \
-I$(top_srcdir) \
......
include $(top_srcdir)/Makefile.decl
SUBDIRS=gtk-2.0
include $(top_srcdir)/Makefile.decl
themedir = $(datadir)/themes/MS-Windows/gtk-2.0
theme_DATA=gtkrc
EXTRA_DIST=$(theme_DATA)
EXTRA_DIST += $(theme_DATA)
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
......
## Makefile.am for gtk+/modules/input
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
......
include $(top_srcdir)/Makefile.decl
SUBDIRS = file lpr
if HAVE_CUPS
......
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
......
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
......
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
......
include $(top_srcdir)/Makefile.decl
if PLATFORM_WIN32
no_undefined = -no-undefined
endif
......
## Makefile.am for gtk+/perf
include $(top_srcdir)/Makefile.decl
INCLUDES = \
-I$(top_srcdir) \
......@@ -93,7 +94,7 @@ typebuiltins.c: @REBUILD@ $(headers_with_enums) Makefile
&& rm -f xgen-gtbc
EXTRA_DIST = \
EXTRA_DIST += \
README \
marshalers.list \
$(BUILT_SOURCES)
......
## Makefile.am for gtk+/tests
include $(top_srcdir)/Makefile.decl
INCLUDES = \
-I$(top_srcdir) \
......@@ -317,7 +318,7 @@ testrecentchoosermenu_SOURCES = \
testvolumebutton_SOURCES = \
testvolumebutton.c
EXTRA_DIST = \
EXTRA_DIST += \
prop-editor.h \
testgtk.1 \
testgtkrc \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment