mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 19:00:22 +01:00
Include cairo-perf in make check
Although cairo-perf is not written to perform explicit failure testing of cairo, it does generate long sequences of cairo operations which often trigger unexpected errors. By including it with make check, it becomes even easier for the programmer to check that one has not broken cairo in terms of expected behaviour or performance.
This commit is contained in:
parent
0ffb021e9b
commit
d64ef35521
2 changed files with 21 additions and 12 deletions
|
|
@ -2,7 +2,7 @@ DIST_SUBDIRS = pixman src boilerplate test perf doc
|
|||
SUBDIRS = pixman src doc
|
||||
# libpng is required for our test programs
|
||||
if CAIRO_HAS_PNG_FUNCTIONS
|
||||
SUBDIRS += boilerplate test
|
||||
SUBDIRS += boilerplate test perf
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -19,6 +19,7 @@ recheck: all
|
|||
cd test && $(MAKE) $(AM_MAKEFLAGS) recheck
|
||||
check-valgrind: all
|
||||
cd test && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
|
||||
cd perf && $(MAKE) $(AM_MAKEFLAGS) check-valgrind
|
||||
perf: all
|
||||
cd perf && $(MAKE) $(AM_MAKEFLAGS) perf
|
||||
lcov: check
|
||||
|
|
|
|||
|
|
@ -65,7 +65,12 @@ TARGETS = $(CAIRO_TEST_TARGET)
|
|||
ITERS = $(CAIRO_PERF_ITERATIONS)
|
||||
CAIRO_PERF_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="$(ITERS)"
|
||||
|
||||
perf: cairo-perf FORCE
|
||||
# Cap the maximum number of iterations during 'make check'
|
||||
TESTS_ENVIRONMENT = CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_PERF_ITERATIONS="10"
|
||||
|
||||
TESTS = cairo-perf
|
||||
|
||||
perf: cairo-perf
|
||||
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf
|
||||
|
||||
html: index.html
|
||||
|
|
@ -73,6 +78,7 @@ html: index.html
|
|||
index.html: cairo-perf
|
||||
$(CAIRO_PERF_ENVIRONMENT) ./cairo-perf-diff -h HEAD > $@
|
||||
|
||||
|
||||
EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)
|
||||
VALGRIND_MEMCHECK_FLAGS = \
|
||||
--tool=memcheck \
|
||||
|
|
@ -85,15 +91,17 @@ CLEANFILES = \
|
|||
callgrind.out.* \
|
||||
index.html
|
||||
|
||||
perf-valgrind: cairo-perf FORCE
|
||||
$(CAIRO_PERF_ENVIRONMENT) $(top_srcdir)/libtool --mode=execute \
|
||||
valgrind $(VALGRIND_MEMCHECK_FLAGS) $(EXTRA_VALGRIND_FLAGS) \
|
||||
./cairo-perf 2>&1 | tee valgrind-log
|
||||
perf-callgrind: cairo-perf FORCE
|
||||
$(CAIRO_PERF_ENVIRONMENT) $(top_srcdir)/libtool --mode=execute \
|
||||
valgrind $(VALGRIND_CALLGRIND_FLAGS) $(EXTRA_VALGRIND_FLAGS) \
|
||||
./cairo-perf
|
||||
check-valgrind perf-valgrind:
|
||||
$(MAKE) $(AM_MAKEFLAGS) check \
|
||||
TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
|
||||
$(top_srcdir)/libtool --mode=execute \
|
||||
valgrind $(VALGRIND_MEMCHECK_FLAGS) $(EXTRA_VALGRIND_FLAGS)' \
|
||||
| tee valgrind-log
|
||||
|
||||
FORCE:
|
||||
perf-callgrind:
|
||||
$(MAKE) $(AM_MAKEFLAGS) check \
|
||||
TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) \
|
||||
$(top_srcdir)/libtool --mode=execute \
|
||||
valgrind $(VALGRIND_CALLGRIND_FLAGS) $(EXTRA_VALGRIND_FLAGS)'
|
||||
|
||||
.PHONY: perf perf-valgrind perf-callgrind FORCE
|
||||
.PHONY: perf html check-valgrind perf-valgrind perf-callgrind
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue