summaryrefslogtreecommitdiff
path: root/tests/Makefile.tests
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2018-09-10 16:46:59 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2018-09-10 16:46:59 +1000
commitb94c056b137e59deefc62fbfe0cd3a23edfcc07c (patch)
tree2bce03b8f128958e5c2451c34ed284cbafd5736f /tests/Makefile.tests
parentfd06c54d4711f20d16bb1e18cba4d7bed09e5ad2 (diff)
downloaddevice-tree-compiler-b94c056b137e59deefc62fbfe0cd3a23edfcc07c.tar.gz
Make valgrind optional
Some platforms don't have valgrind support, and sometimes you simply might not want to use valgrind. But at present, dtc, or more specifically its testsuite, won't compile without valgrind because we use the valgrind client interface in some places to improve our testing and suppress false positives. This adds some Makefile detection to correctly handle the case where valgrind is not available. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/Makefile.tests')
-rw-r--r--tests/Makefile.tests5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 6903333..bd1c8ef 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -83,8 +83,13 @@ tests_clean:
check: tests ${TESTS_BIN} $(TESTS_PYLIBFDT)
cd $(TESTS_PREFIX); ./run_tests.sh
+ifeq ($(NO_VALGRIND),1)
+checkm:
+ @echo "make checkm requires valgrind, but NO_VALGRIND=1"
+else
checkm: tests ${TESTS_BIN} $(TESTS_PYLIBFDT)
cd $(TESTS_PREFIX); ./run_tests.sh -m 2>&1 | tee vglog.$$$$
+endif
checkv: tests ${TESTS_BIN} $(TESTS_PYLIBFDT)
cd $(TESTS_PREFIX); ./run_tests.sh -v