On WSL the interop PATH holds a dozen /mnt/c directories, reached over 9P.
proc's look cache stats every PATH directory, and in tests it is never
fresh (lookFreshInTests is 0), so every command a test runs paid for a
dozen 9P stats. internal/cli took over 40 minutes on the magpie-desktop
distro and timed out at 45m; two of its tests alone took 34.9s each with
/mnt in PATH and 0.27s without. A test also found Windows programs
there (VS Code's `code`) instead of the fake it set up.
Isolate now drops every /mnt/<drive> entry from PATH when it runs under
WSL (WSL_DISTRO_NAME, WSL_INTEROP or binfmt_misc's WSLInterop). /mnt/wsl
and /mnt/wslg stay.
Run (wsl-run, magpie-desktop):
- go test ./internal/testenv: ok. TestIsolateDropsWindowsPath is red
with dropWindowsPath returning early, green with the fix.
- internal/cli: 36.7s, was over 40m; its one red is
TestEveryRouteHasACommandOrIsNamed, from 60fde6fb1, fixed in the next
commit.
- internal/proc ok (3.5s), internal/library ok (68s), internal/agent ok
(113s).
- GOOS=windows go vet and GOOS=darwin go vet -tags nogui of
./internal/testenv ./internal/cli: clean.
Not run: the full suite (mote and mica were over their load bar).