소스 검색

Fix: test run command (#463)

Kslr 5 년 전
부모
커밋
d1eafe2b4c
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      testing/scenarios/common_coverage.go
  2. 1 1
      testing/scenarios/common_regular.go

+ 1 - 1
testing/scenarios/common_coverage.go

@@ -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
testing/scenarios/common_regular.go

@@ -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