From 5bebe87492af4794fb60ec14e84b18744f414e6e Mon Sep 17 00:00:00 2001 From: Kslr Date: Fri, 27 Nov 2020 08:19:52 +0800 Subject: [PATCH] Fix: test run command (#463) --- testing/scenarios/common_coverage.go | 2 +- testing/scenarios/common_regular.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/scenarios/common_coverage.go b/testing/scenarios/common_coverage.go index ed6c7b5a3..b124fa297 100644 --- a/testing/scenarios/common_coverage.go +++ b/testing/scenarios/common_coverage.go @@ -27,7 +27,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 diff --git a/testing/scenarios/common_regular.go b/testing/scenarios/common_regular.go index fc3d29970..1c5bdcab7 100644 --- a/testing/scenarios/common_regular.go +++ b/testing/scenarios/common_regular.go @@ -22,7 +22,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