* [PATCH 2/7] Makefile.PL: fix syntax for ASan and valgrind targets
@ 2023-08-30 5:10 5% ` Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2023-08-30 5:10 UTC (permalink / raw)
To: meta
Mixing various quoting and escaping rules between shell, make,
and Perl got confusing in Makefile.PL :x This hopefully sorts
out my confusion.
We'll also fix and use TEST_XH_CXX_ONLY=1 to avoid needlessly
running the tests on the XS||SWIG implementation when we're
checking for memory errors.
Fixes: 2312ca26023fcbe3 (makefile: add targets for ASan and valgrind)
---
Makefile.PL | 9 +++++----
t/xap_helper.t | 7 +++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index 5865a252..d2309336 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -264,12 +264,13 @@ lib/PublicInbox.pm : FORCE
VERSION=\$(VERSION) \$(PERL) -w ./version-gen.perl
test-asan : pure_all
- CXXFLAGS='-O0 -Wall -ggdb3 -fsanitize=address' \
+ TEST_XH_CXX_ONLY=1 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'
+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
+ TEST_XH_CXX_ONLY=1 VALGRIND="valgrind \$(VG_OPT)" \\
+ prove -bvw t/xap_helper.t
EOF
}
diff --git a/t/xap_helper.t b/t/xap_helper.t
index 73c1c849..b68f2773 100644
--- a/t/xap_helper.t
+++ b/t/xap_helper.t
@@ -107,13 +107,12 @@ my $test = sub {
};
my $ar;
-my @NO_CXX;
-if (!$ENV{TEST_XH_CXX_ONLY}) {
+my @NO_CXX = (1);
+unless ($ENV{TEST_XH_CXX_ONLY}) {
$ar = $test->(qw[-MPublicInbox::XapHelper -e
PublicInbox::XapHelper::start('-j0')]);
$ar = $test->(qw[-MPublicInbox::XapHelper -e
PublicInbox::XapHelper::start('-j1')]);
- push @NO_CXX, 0;
}
SKIP: {
eval {
@@ -121,8 +120,8 @@ SKIP: {
PublicInbox::XapHelperCxx::check_build();
};
skip "XapHelperCxx build: $@", 1 if $@;
- push @NO_CXX, 1;
+ @NO_CXX = $ENV{TEST_XH_CXX_ONLY} ? (0) : (0, 1);
$ar = $test->(qw[-MPublicInbox::XapHelperCxx -e
PublicInbox::XapHelperCxx::start('-j0')]);
$ar = $test->(qw[-MPublicInbox::XapHelperCxx -e
^ permalink raw reply related [relevance 5%]
* [PATCH 2/4] makefile: add targets for ASan and valgrind
2023-08-26 6:13 5% [PATCH 0/4] minor cindex-related build stuff Eric Wong
@ 2023-08-26 6:13 7% ` Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2023-08-26 6:13 UTC (permalink / raw)
To: meta
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
}
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] minor cindex-related build stuff
@ 2023-08-26 6:13 5% Eric Wong
2023-08-26 6:13 7% ` [PATCH 2/4] makefile: add targets for ASan and valgrind Eric Wong
0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2023-08-26 6:13 UTC (permalink / raw)
To: meta
The first one is a minor test improvement I had lying around
on a VM I nearly forgot about. The rest are small improvements
related to -cindex. Allowing stuff to work on non-Linux
w/o Inline::C nor Socket::MsgHdr still needs doing...
Eric Wong (4):
t/psgi_scan_all: reduce use_ok statements
makefile: add targets for ASan and valgrind
cindex: document pipelines created for prune
xap_helper: fix C++-specific warnings
Makefile.PL | 9 +++++++++
lib/PublicInbox/CodeSearchIdx.pm | 9 ++++++++-
lib/PublicInbox/xap_helper.h | 12 +++++++-----
t/psgi_scan_all.t | 16 +++++++---------
4 files changed, 31 insertions(+), 15 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-08-26 6:13 5% [PATCH 0/4] minor cindex-related build stuff Eric Wong
2023-08-26 6:13 7% ` [PATCH 2/4] makefile: add targets for ASan and valgrind Eric Wong
2023-08-30 5:10 [PATCH 0/7] various build fixes + OpenBSD compat Eric Wong
2023-08-30 5:10 5% ` [PATCH 2/7] Makefile.PL: fix syntax for ASan and valgrind targets Eric Wong
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).