From 2312ca26023fcbe3dd9f6cd141ef19d510f32660 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 26 Aug 2023 06:13:15 +0000 Subject: makefile: add targets for ASan and valgrind I would never consider working on C++ code without at least one one of these tools present. --- Makefile.PL | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile.PL') diff --git a/Makefile.PL b/Makefile.PL index 710d705d..5865a252 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -262,5 +262,14 @@ symlink-install : lib/PublicInbox.pm pure_all :: lib/PublicInbox.pm lib/PublicInbox.pm : FORCE VERSION=\$(VERSION) \$(PERL) -w ./version-gen.perl + +test-asan : pure_all + CXXFLAGS='-O0 -Wall -ggdb3 -fsanitize=address' \ + prove -bvw t/xap_helper.t + +VG_OPT = '-v --trace-children=yes --track-fds=yes' +VG_OPT += ' --leak-check=yes --track-origins=yes' +test-valgrind : pure_all + VALGRIND="valgrind \$\$(VG_OPT)" prove -bvw t/xap_helper.t EOF } -- cgit v1.2.3-24-ge0c7