From adb66ba7a4916d4013f1ef7ebceca2aa28e017b5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Jun 2025 10:24:27 +0000 Subject: [PATCH] test_common: fix xap_helper build reuse The change in commit c45a5498 to avoid copying introduced a major test performance regression since the extra XFLAGS and xap_modversion files (required to detect changes for rebuilding) weren't copied. Instead, just symlink the entire architecture-specific directory instead of individual files. I didn't notice the slowdown earlier since I only tested on a busy system where my worktree is on an overloaded HDD. Fixes: c45a5498 (test_common: symlink xap_helper instead of excessive copying, 2025-06-01) --- lib/PublicInbox/TestCommon.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index fe81b3059..ab988de40 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -783,9 +783,9 @@ SKIP: { my $home = "$tmpdir/lei-daemon"; mkdir($home, 0700); local $ENV{HOME} = $home; - if ($xh_cmd && $xh_cmd->[0] =~ m!\A.+/+([^/]+)\z!) { - # avoid repeated rebuilds by symlinking - my ($src, $bn) = ($xh_cmd->[0], $1); + if ($xh_cmd && $xh_cmd->[0] =~ m!\A(.+/+([^/]+))/+[^/]+\z!) { + # avoid repeated rebuilds by symlinking entire dir + my ($src, $bn) = ($1, $2); my $dst = "$home/.cache/public-inbox/jaot"; File::Path::make_path($dst); symlink $src, "$dst/$bn"; -- 2.47.3