mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 07:21:23 +08:00
fix: unittest
This commit is contained in:
@@ -14,11 +14,7 @@ import (
|
|||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
fmt.Println("[TestMain] build go plugin")
|
fmt.Println("[TestMain] build go plugin")
|
||||||
// go tool compile -help
|
cmd := exec.Command("go", "build", "-buildmode=plugin", `-race`, "-o=examples/debugtalk.so", "examples/plugin/debugtalk.go")
|
||||||
// all=: apply to all packages
|
|
||||||
// -N: disable optimizations
|
|
||||||
// -l: disable inlining
|
|
||||||
cmd := exec.Command("go", "build", "-buildmode=plugin", `-gcflags="all=-N -l"`, "-o=examples/debugtalk.so", "examples/plugin/debugtalk.go")
|
|
||||||
if err := cmd.Run(); err != nil {
|
if err := cmd.Run(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user