user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 2/4] makefile: add targets for ASan and valgrind
Date: Sat, 26 Aug 2023 06:13:15 +0000	[thread overview]
Message-ID: <20230826061317.780676-3-e@80x24.org> (raw)
In-Reply-To: <20230826061317.780676-1-e@80x24.org>

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(+)

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
 }

  parent reply	other threads:[~2023-08-26  6:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-26  6:13 [PATCH 0/4] minor cindex-related build stuff Eric Wong
2023-08-26  6:13 ` [PATCH 1/4] t/psgi_scan_all: reduce use_ok statements Eric Wong
2023-08-26  6:13 ` Eric Wong [this message]
2023-08-26  6:13 ` [PATCH 3/4] cindex: document pipelines created for prune Eric Wong
2023-08-26  6:13 ` [PATCH 4/4] xap_helper: fix C++-specific warnings Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230826061317.780676-3-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).