fix coverage test

pull/876/head
Darien Raymond 2018-02-16 15:29:22 +01:00
parent 07ca87990d
commit 95be224caf
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ func RunV2RayProtobuf(config []byte) *exec.Cmd {
covDir := filepath.Join(os.Getenv("GOPATH"), "out", "v2ray", "cov")
os.MkdirAll(covDir, os.ModeDir)
profile := uuid.New().String() + ".out"
randomID := uuid.New()
profile := randomID.String() + ".out"
proc := exec.Command(testBinaryPath, "-config=stdin:", "-format=pb", "-test.run", "TestRunMainForCoverage", "-test.coverprofile", profile, "-test.outputdir", covDir)
proc.Stdin = bytes.NewBuffer(config)
proc.Stderr = os.Stderr