1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

Fix: test run command (#463)

This commit is contained in:
Kslr 2020-11-27 08:19:52 +08:00 committed by Shelikhoo
parent a96e093432
commit d1eafe2b4c
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ func RunV2RayProtobuf(config []byte) *exec.Cmd {
os.MkdirAll(covDir, os.ModeDir)
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 := exec.Command(testBinaryPath, "run", "-config=stdin:", "-format=pb", "-test.run", "TestRunMainForCoverage", "-test.coverprofile", profile, "-test.outputdir", covDir)
proc.Stdin = bytes.NewBuffer(config)
proc.Stderr = os.Stderr
proc.Stdout = os.Stdout

View File

@ -23,7 +23,7 @@ func BuildV2Ray() error {
func RunV2RayProtobuf(config []byte) *exec.Cmd {
genTestBinaryPath()
proc := exec.Command(testBinaryPath, "-config=stdin:", "-format=pb")
proc := exec.Command(testBinaryPath, "run", "-config=stdin:", "-format=pb")
proc.Stdin = bytes.NewBuffer(config)
proc.Stderr = os.Stderr
proc.Stdout = os.Stdout