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)
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";