From c7ed6db537cf1c555c6daca4684d91ed7540ba23 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 6 Jan 2022 18:22:25 +0800 Subject: [PATCH] fix: unittest --- plugin_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin_test.go b/plugin_test.go index 7e4ff8ac..41e37684 100644 --- a/plugin_test.go +++ b/plugin_test.go @@ -14,11 +14,7 @@ import ( func TestMain(m *testing.M) { fmt.Println("[TestMain] build go plugin") - // go tool compile -help - // 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") + cmd := exec.Command("go", "build", "-buildmode=plugin", `-race`, "-o=examples/debugtalk.so", "examples/plugin/debugtalk.go") if err := cmd.Run(); err != nil { panic(err) }