Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取测试覆盖率失败 #165

Open
yyfyfyang opened this issue May 15, 2024 · 1 comment
Open

获取测试覆盖率失败 #165

yyfyfyang opened this issue May 15, 2024 · 1 comment

Comments

@yyfyfyang
Copy link

go test -coverprofile=coverage.out
在执行go test的时候获取测试覆盖率的时候测试程序会崩溃,我mac使用的是apple m1芯片

unexpected fault address 0x10168b678
fatal error: fault
[signal SIGBUS: bus error code=0x1 addr=0x10168b678 pc=0x10168b678]

goroutine 35 gp=0x140002c96c0 m=0 mp=0x101fb0940 [running]:
runtime.throw({0x1016a3d8a?, 0x14000130a20?})
@xhd2015
Copy link

xhd2015 commented May 15, 2024

或许试试xgo test -coverprofile=coverage.out
同样支持mock,但是兼容性更好,功能更多。
https://github.com/xhd2015/xgo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants