Fix: test run command (#463)

This commit is contained in:
Kslr
2021-09-04 11:05:19 +01:00
committed by Shelikhoo
parent a96e093432
commit d1eafe2b4c
2 changed files with 2 additions and 2 deletions
+1 -1
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
+1 -1
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