mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-31 14:35:37 -05:00
run coverage with go module
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
|
||||
FAIL=0
|
||||
|
||||
V2RAY_OUT=${GOPATH}/out/v2ray
|
||||
V2RAY_COV=${V2RAY_OUT}/cov
|
||||
V2RAY_OUT=${PWD}/out/v2ray
|
||||
export V2RAY_COV=${V2RAY_OUT}/cov
|
||||
COVERAGE_FILE=${V2RAY_COV}/coverage.txt
|
||||
|
||||
function test_package {
|
||||
DIR="v2ray.com/core$1"
|
||||
DIR=".$1"
|
||||
DEP=$(go list -f '{{ join .Deps "\n" }}' $DIR | grep v2ray | tr '\n' ',')
|
||||
DEP=${DEP}$DIR
|
||||
RND_NAME=$(openssl rand -hex 16)
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"bytes"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"v2ray.com/core/common/uuid"
|
||||
)
|
||||
@@ -24,7 +23,7 @@ func BuildV2Ray() error {
|
||||
func RunV2RayProtobuf(config []byte) *exec.Cmd {
|
||||
genTestBinaryPath()
|
||||
|
||||
covDir := filepath.Join(os.Getenv("GOPATH"), "out", "v2ray", "cov")
|
||||
covDir := os.Getenv("V2RAY_COV")
|
||||
os.MkdirAll(covDir, os.ModeDir)
|
||||
randomID := uuid.New()
|
||||
profile := randomID.String() + ".out"
|
||||
|
||||
Reference in New Issue
Block a user