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