X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Makefile.decl;h=50cf16953bf97f0453fd1deb1051bacc2bd8f733;hb=2054ccad95cfdcf5eccd2ef6847c12039c9678e8;hp=eb8237a8e1d741b1013b8df4a5ab2af55e3b9013;hpb=61027a8b5ce75c68f2a6e84134ea88af1f8a5556;p=platform%2Fupstream%2Fglib.git diff --git a/Makefile.decl b/Makefile.decl index eb8237a..50cf169 100644 --- a/Makefile.decl +++ b/Makefile.decl @@ -11,13 +11,18 @@ TEST_PROGS = ### testing rules # test: run all tests in cwd and subdirs -test: ${TEST_PROGS} +test: test-nonrecursive if OS_UNIX - @test -z "${TEST_PROGS}" || MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS} @ for subdir in $(SUBDIRS) . ; do \ test "$$subdir" = "." -o "$$subdir" = "po" || \ ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ done + +# test-nonrecursive: run tests only in cwd +test-nonrecursive: ${TEST_PROGS} + @test -z "${TEST_PROGS}" || G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS} +else +test-nonrecursive: endif # test-report: run tests in subdirs and generate report @@ -41,17 +46,23 @@ test-report perf-report full-report: ${TEST_PROGS} GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \ ignore_logdir=false ; \ fi ; \ + if test -d "$(top_srcdir)/.git" ; then \ + REVISION=`git describe` ; \ + else \ + REVISION=$(VERSION) ; \ + fi ; \ for subdir in $(SUBDIRS) . ; do \ test "$$subdir" = "." -o "$$subdir" = "po" || \ ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ done ; \ $$ignore_logdir || { \ - echo '' > $@.xml ; \ - echo '' >> $@.xml ; \ - echo '' >> $@.xml ; \ - echo ' $(PACKAGE)' >> $@.xml ; \ - echo ' $(VERSION)' >> $@.xml ; \ - echo '' >> $@.xml ; \ + echo '' > $@.xml ; \ + echo '' >> $@.xml ; \ + echo '' >> $@.xml ; \ + echo ' $(PACKAGE)' >> $@.xml ; \ + echo ' $(VERSION)' >> $@.xml ; \ + echo " $$REVISION" >> $@.xml ; \ + echo '' >> $@.xml ; \ for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \ sed '1,1s/^?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \ done ; \ @@ -60,7 +71,7 @@ test-report perf-report full-report: ${TEST_PROGS} rm -rf "$$GTESTER_LOGDIR"/ ; \ ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \ } -.PHONY: test test-report perf-report full-report +.PHONY: test test-report perf-report full-report test-nonrecursive .PHONY: lcov genlcov lcov-clean # use recursive makes in order to ignore errors during check @@ -73,15 +84,14 @@ lcov: # we also have to delete tests/.libs/libmoduletestplugin_*.gcda genlcov: rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda - $(LTP) --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum - $(SED) -e 's#.libs/##' < glib-lcov.info > glib-lcov.info.tmp - LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --show-details glib-lcov.info.tmp - rm -f glib-lcov.info.tmp + $(LTP) --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name GLIB_PERF --no-checksum --compat-libtool + LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory glib-lcov --title "GLib Code Coverage" --legend --show-details glib-lcov.info + @echo "file://$(abs_top_builddir)/glib-lcov/index.html" lcov-clean: -$(LTP) --directory $(top_builddir) -z -rm -rf glib-lcov.info glib-lcov -find -name '*.gcda' -print | xargs rm -# run make test as part of make check -check-local: test +# run tests in cwd as part of make check +check-local: test-nonrecursive