Make GIOSchedulerJobFunc return boolean Keep calling io jobs until they
[platform/upstream/glib.git] / Makefile.decl
1 # GLIB - Library of useful C routines
2
3 #GTESTER = gtester                      # for non-GLIB packages
4 GTESTER = $(top_builddir)/glib/gtester                  # for the GLIB package
5 GTESTER_REPORT = $(top_builddir)/glib/gtester-report    # for the GLIB package
6
7 # initialize variables for unconditional += appending
8 EXTRA_DIST =
9 TEST_PROGS =
10
11 ### testing rules
12
13 # test: run all tests in cwd and subdirs
14 test:   ${TEST_PROGS}
15         @test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
16         @ for subdir in $(SUBDIRS) ; do \
17             test "$$subdir" = "." -o "$$subdir" = "po" || \
18             ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
19           done
20 # test-report: run tests in subdirs and generate report
21 # perf-report: run tests in subdirs with -m perf and generate report
22 # full-report: like test-report: with -m perf and -m slow
23 test-report perf-report full-report:    ${TEST_PROGS}
24         @test -z "${TEST_PROGS}" || { \
25           case $@ in \
26           test-report) test_options="-k";; \
27           perf-report) test_options="-k -m=perf";; \
28           full-report) test_options="-k -m=perf -m=slow";; \
29           esac ; \
30           if test -z "$$GTESTER_LOGDIR" ; then  \
31             ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
32           elif test -n "${TEST_PROGS}" ; then \
33             ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
34           fi ; \
35         }
36         @ ignore_logdir=true ; \
37           if test -z "$$GTESTER_LOGDIR" ; then \
38             GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
39             ignore_logdir=false ; \
40           fi ; \
41           for subdir in $(SUBDIRS) ; do \
42             test "$$subdir" = "." -o "$$subdir" = "po" || \
43             ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
44           done ; \
45           $$ignore_logdir || { \
46             echo '<?xml version="1.0"?>' > $@.xml ; \
47             echo '<report-collection>'  >> $@.xml ; \
48             for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
49               sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
50             done ; \
51             echo >> $@.xml ; \
52             echo '</report-collection>' >> $@.xml ; \
53             rm -rf "$$GTESTER_LOGDIR"/ ; \
54             ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
55           }
56 .PHONY: test test-report perf-report full-report
57 # run make test as part of make check
58 check-local: test