summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-04-19 23:12:09 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-04-19 23:12:09 +0100
commitd64ef355217db7a555da0029187d19c80ec12609 (patch)
tree55f1eba8aa2d5c80f200f508b9aafdd5b92b404a /perf
parent0ffb021e9b0cc2ec9afc3eaa360b4518327afa6c (diff)
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.
Diffstat (limited to 'perf')
-rw-r--r--perf/Makefile.am30
1 files changed, 19 insertions, 11 deletions
diff --git a/perf/Makefile.am b/perf/Makefile.am
index 59e0b339..86bdd26f 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -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