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