381
381
top_build_prefix = @top_build_prefix@
382
382
top_builddir = @top_builddir@
383
383
top_srcdir = @top_srcdir@
384
GTESTER = gtester # in $PATH for non-GLIB packages
385
GTESTER_REPORT = gtester-report # in $PATH for non-GLIB packages
387
# initialize variables for unconditional += appending
393
# Xvfb based test rules
394
XVFB = Xvfb -ac -noreset -screen 0 800x600x16
395
XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \
396
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 \
397
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 \
398
1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 \
399
9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 \
400
9995 9996 9997 9998 9999
403
test "$(gdktarget)" != "x11" \
404
&& echo "Gtk+Tests:INFO: Skipping GUI tests for non-X11 target."
407
${XVFB} -help 2>/dev/null 1>&2 \
408
&& XID=`for id in $(XIDS) ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \
409
&& { ${XVFB} :$$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \
410
trap "kill -15 $$! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } \
411
|| { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
412
&& DISPLAY=:$$XID && export DISPLAY
414
384
SUBDIRS = reference
415
385
all: all-recursive
418
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
388
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
419
389
@for dep in $?; do \
420
390
case '$(am__configure_deps)' in \
712
.MAKE: $(am__recursive_targets) check-am install-am install-strip
680
.MAKE: $(am__recursive_targets) install-am install-strip
714
682
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
715
check-am check-local clean clean-generic clean-libtool \
716
cscopelist-am ctags ctags-am distclean distclean-generic \
717
distclean-libtool distclean-tags distdir dvi dvi-am html \
718
html-am info info-am install install-am install-data \
719
install-data-am install-dvi install-dvi-am install-exec \
720
install-exec-am install-html install-html-am install-info \
721
install-info-am install-man install-pdf install-pdf-am \
722
install-ps install-ps-am install-strip installcheck \
723
installcheck-am installdirs installdirs-am maintainer-clean \
724
maintainer-clean-generic mostlyclean mostlyclean-generic \
725
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
728
# call as: $(XVFB_START) && someprogram
730
# test: run all tests in cwd and subdirs
732
@$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
733
$(XVFB_START) && { set -e; ${GTESTER} --verbose ${TEST_PROGS}; }; \
735
@ for subdir in $(SUBDIRS) ; do \
736
test "$$subdir" = "." -o "$$subdir" = "po" -o "$$subdir" = "po-properties" || \
737
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
739
# test-report: run tests in subdirs and generate report
740
# perf-report: run tests in subdirs with -m perf and generate report
741
# full-report: like test-report: with -m perf and -m slow
742
test-report perf-report full-report: ${TEST_PROGS}
743
@ ignore_logdir=true ; \
744
if test -z "$$GTESTER_LOGDIR" ; then \
745
GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
746
ignore_logdir=false ; \
748
for subdir in $(SUBDIRS) ; do \
749
test "$$subdir" = "." -o "$$subdir" = "po" -o "$$subdir" = "po-properties" || \
750
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
752
$(SKIP_GDKTARGET) || test -z "${TEST_PROGS}" || { \
754
test-report) test_options="-k";; \
755
perf-report) test_options="-k -m=perf";; \
756
full-report) test_options="-k -m=perf -m=slow";; \
760
if test -z "$$GTESTER_LOGDIR" ; then \
761
${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
762
elif test -n "${TEST_PROGS}" ; then \
763
${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
767
$$ignore_logdir || { \
768
echo '<?xml version="1.0"?>' > $@.xml ; \
769
echo '<report-collection>' >> $@.xml ; \
770
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
771
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
774
echo '</report-collection>' >> $@.xml ; \
775
rm -rf "$$GTESTER_LOGDIR"/ ; \
776
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
778
.PHONY: test test-report perf-report full-report
779
# run make test as part of make check
683
check-am clean clean-generic clean-libtool cscopelist-am ctags \
684
ctags-am distclean distclean-generic distclean-libtool \
685
distclean-tags distdir dvi dvi-am html html-am info info-am \
686
install install-am install-data install-data-am install-dvi \
687
install-dvi-am install-exec install-exec-am install-html \
688
install-html-am install-info install-info-am install-man \
689
install-pdf install-pdf-am install-ps install-ps-am \
690
install-strip installcheck installcheck-am installdirs \
691
installdirs-am maintainer-clean maintainer-clean-generic \
692
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
693
ps ps-am tags tags-am uninstall uninstall-am
782
696
-include $(top_srcdir)/git.mk