Merge pull request #1151 from luoliwoshang/internal/build/testdir

internal/build:switch workdir from testpkg like go behavior
This commit is contained in:
xushiwei
2025-06-22 15:26:07 +08:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -580,6 +580,7 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, global l
switch mode {
case ModeTest:
cmd := exec.Command(app, conf.RunArgs...)
cmd.Dir = pkg.Dir
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run()