1 ### glib-networking declarations
5 module_flags = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload|query)'
7 giomoduledir = $(GIO_MODULE_DIR)
10 -DG_LOG_DOMAIN=\"GLib-Net\" \
11 -DG_DISABLE_DEPRECATED \
16 ### gtester stuff from glib
18 GTESTER = gtester # for non-GLIB packages
19 GTESTER_REPORT = gtester-report # for the GLIB package
21 # initialize variables for unconditional += appending
27 # test: run all tests in cwd and subdirs
28 test: test-nonrecursive
29 @ for subdir in $(SUBDIRS) . ; do \
30 test "$$subdir" = "." -o "$$subdir" = "po" || \
31 ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
34 # test-nonrecursive: run tests only in cwd
35 test-nonrecursive: ${TEST_PROGS}
36 @test -z "${TEST_PROGS}" || ${TEST_ENVIRONMENT} ${GTESTER} --verbose ${TEST_PROGS}
38 # test-report: run tests in subdirs and generate report
39 # perf-report: run tests in subdirs with -m perf and generate report
40 # full-report: like test-report: with -m perf and -m slow
41 test-report perf-report full-report: ${TEST_PROGS}
42 @test -z "${TEST_PROGS}" || { \
44 test-report) test_options="-k";; \
45 perf-report) test_options="-k -m=perf";; \
46 full-report) test_options="-k -m=perf -m=slow";; \
48 if test -z "$$GTESTER_LOGDIR" ; then \
49 ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
50 elif test -n "${TEST_PROGS}" ; then \
51 ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
54 @ ignore_logdir=true ; \
55 if test -z "$$GTESTER_LOGDIR" ; then \
56 GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
57 ignore_logdir=false ; \
59 if test -d "$(top_srcdir)/.git" ; then \
60 REVISION=`git describe` ; \
62 REVISION=$(VERSION) ; \
64 for subdir in $(SUBDIRS) . ; do \
65 test "$$subdir" = "." -o "$$subdir" = "po" || \
66 ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
68 $$ignore_logdir || { \
69 echo '<?xml version="1.0"?>' > $@.xml ; \
70 echo '<report-collection>' >> $@.xml ; \
71 echo '<info>' >> $@.xml ; \
72 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
73 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
74 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
75 echo '</info>' >> $@.xml ; \
76 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
77 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
80 echo '</report-collection>' >> $@.xml ; \
81 rm -rf "$$GTESTER_LOGDIR"/ ; \
82 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
84 .PHONY: test test-report perf-report full-report test-nonrecursive
86 .PHONY: lcov genlcov lcov-clean
87 # use recursive makes in order to ignore errors during check
89 find $(top_builddir) -name '*.gcda' -delete
90 -$(MAKE) $(AM_MAKEFLAGS) -k check
91 $(MAKE) $(AM_MAKEFLAGS) genlcov
94 $(LTP) --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool
95 LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --show-details glib-lcov.info
98 -$(LTP) --directory $(top_builddir) -z
99 -rm -rf glib-lcov.info glib-lcov
100 -find -name '*.gcda' -print | xargs rm
102 # run tests in cwd as part of make check
103 check-local: test-nonrecursive