From: Eric Wong Date: Sat, 26 Aug 2023 06:13:15 +0000 (+0000) Subject: makefile: add targets for ASan and valgrind X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2312ca26023fcbe3dd9f6cd141ef19d510f32660;p=thirdparty%2Fpublic-inbox.git makefile: add targets for ASan and valgrind I would never consider working on C++ code without at least one one of these tools present. --- diff --git a/Makefile.PL b/Makefile.PL index 710d705db..5865a2524 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 }