mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-03 10:07:59 +02:00
2003-04-05 Havoc Pennington <hp@pobox.com>
* Makefile.am (coverage-report.txt): add target "coverage-report.txt" * test/decode-gcov.c: hack up a little program to suck data out of gcov files. Yes this is sort of silly. * configure.in: define something in config.h and do an AM_CONDITIONAL when gcov is enabled
This commit is contained in:
parent
03b9ca6d4e
commit
3a96e4ffd9
7 changed files with 2012 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2003-04-05 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* Makefile.am (coverage-report.txt): add target "coverage-report.txt"
|
||||
|
||||
* test/decode-gcov.c: hack up a little program to suck data
|
||||
out of gcov files. Yes this is sort of silly.
|
||||
|
||||
* configure.in: define something in config.h and do an
|
||||
AM_CONDITIONAL when gcov is enabled
|
||||
|
||||
2003-04-04 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
|
||||
|
|
|
|||
30
Makefile.am
30
Makefile.am
|
|
@ -24,3 +24,33 @@ EXTRA_DIST = \
|
|||
|
||||
all-local: Doxyfile
|
||||
|
||||
if DBUS_GCOV_ENABLED
|
||||
clean-gcov:
|
||||
find -name "*.da" -o -name "*.gcov" | xargs rm || true
|
||||
|
||||
## .PHONY so it always rebuilds it
|
||||
.PHONY: coverage-report.txt
|
||||
coverage-report.txt:
|
||||
GCOV_FILES=`find -name "*.bbg"` ; \
|
||||
C_FILES= ; \
|
||||
for F in $$GCOV_FILES; do \
|
||||
C=`echo $$F | sed -e 's/.bbg/.c/g'` ; \
|
||||
DA=`echo $$F | sed -e 's/.bbg/.da/g'` ; \
|
||||
if test -e $$DA ; then \
|
||||
C_FILES="$$C_FILES $$C" ; \
|
||||
fi ; \
|
||||
done ; \
|
||||
echo $$C_FILES ; \
|
||||
$(top_builddir)/test/decode-gcov --report $$C_FILES > coverage-report.txt
|
||||
|
||||
check-coverage: clean-gcov all check coverage-report.txt
|
||||
cat coverage-report.txt
|
||||
|
||||
else
|
||||
coverage-report.txt:
|
||||
echo "Need to reconfigure with --enable-gcov"
|
||||
|
||||
check-coverage:
|
||||
echo "Need to reconfigure with --enable-gcov"
|
||||
|
||||
endif
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
#include <dbus/dbus-internals.h>
|
||||
#include <dbus/dbus-hash.h>
|
||||
#include <dbus/dbus-list.h>
|
||||
#include <dbus/dbus-spawn.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
|
|
|
|||
26
configure.in
26
configure.in
|
|
@ -123,7 +123,13 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
#### Assorted checks
|
||||
if test x$enable_gcov = xyes; then
|
||||
## so that config.h changes when you toggle gcov support
|
||||
AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
|
||||
fi
|
||||
AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
|
||||
|
||||
#### Integer sizes
|
||||
|
||||
AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
|
|
@ -133,6 +139,24 @@ AC_CHECK_SIZEOF(void *)
|
|||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
|
||||
### this is only used in decode-gcov.c right now
|
||||
case 8 in
|
||||
$ac_cv_sizeof_int)
|
||||
dbusint64=int
|
||||
;;
|
||||
$ac_cv_sizeof_long)
|
||||
dbusint64=long
|
||||
;;
|
||||
$ac_cv_sizeof_long_long)
|
||||
dbusint64='long long'
|
||||
;;
|
||||
$ac_cv_sizeof___int64)
|
||||
dbusint64=__int64
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_DEFINE_UNQUOTED(DBUS_INT64_TYPE, $dbusint64, [64-bit integer type])
|
||||
|
||||
## byte order
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
|
|
|
|||
|
|
@ -2783,8 +2783,8 @@ _dbus_full_duplex_pipe (int *fd1,
|
|||
}
|
||||
|
||||
if (!blocking &&
|
||||
!_dbus_set_fd_nonblocking (fds[0], NULL) ||
|
||||
!_dbus_set_fd_nonblocking (fds[1], NULL))
|
||||
(!_dbus_set_fd_nonblocking (fds[0], NULL) ||
|
||||
!_dbus_set_fd_nonblocking (fds[1], NULL)))
|
||||
{
|
||||
dbus_set_error (error, _dbus_error_from_errno (errno),
|
||||
"Could not set full-duplex pipe nonblocking");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ else
|
|||
TEST_BINARIES=
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS= $(TEST_BINARIES)
|
||||
if DBUS_GCOV_ENABLED
|
||||
GCOV_BINARIES=decode-gcov
|
||||
else
|
||||
GCOV_BINARIES=
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS= $(TEST_BINARIES) $(GCOV_BINARIES)
|
||||
|
||||
echo_client_SOURCES= \
|
||||
echo-client.c \
|
||||
|
|
@ -49,6 +55,9 @@ test_segfault_SOURCES = \
|
|||
test_sleep_forever_SOURCES = \
|
||||
test-sleep-forever.c
|
||||
|
||||
decode_gcov_SOURCES= \
|
||||
decode-gcov.c
|
||||
|
||||
TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
|
||||
|
||||
echo_client_LDADD=$(TEST_LIBS)
|
||||
|
|
@ -58,6 +67,7 @@ unbase64_LDADD=$(TEST_LIBS)
|
|||
break_loader_LDADD= $(TEST_LIBS)
|
||||
#bus_test_LDADD=$(TEST_LIBS) $(top_builddir)/bus/libdbus-daemon.la
|
||||
spawn_test_LDADD=$(TEST_LIBS)
|
||||
decode_gcov_LDADD=$(TEST_LIBS)
|
||||
|
||||
EXTRA_DIST=
|
||||
|
||||
|
|
|
|||
1933
test/decode-gcov.c
Normal file
1933
test/decode-gcov.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue